-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leveraging RabbitMQ Delayed Message Plugin #102
Comments
That looks like it should work. servicebus should be passing any of those options on to amqp.node which allows for a number of properties on the message, including a headers object: http://www.squaremobius.net/amqp.node/channel_api.html#channel_publish. I've got a unit test for exactly this: https://github.com/mateodelnorte/servicebus/blob/master/test/properties.js#L23-L33 |
Yeah, I had a feeling the headers were ok, as thats pretty well documented in your tests. Applying this was less clear:
It looks like exchangeOptions were passed in to the queue (at least on |
can you not just pass those options into the bus() function?
|
I'm not seeing how The |
I tested it though and still did not get a delay applied: |
I found this gist on how to setup I'm not sure that servicebus will propagate all of these values to |
Never mind. It looks like its addressed here: servicebus/bus/rabbitmq/pubsubqueue.js Line 45 in cb0729f
As long as |
This PR ensures that the exchangeOptions and exchangeName are applied when the channel is setup: #103 I still am having issues getting the delay to work properly, however. I have been able to get it to work properly with amqplib directly, and after analyzing the RabbitMQ setup, it appears the issue revolves around queue bindings. When using servicebus, there are no bindings created. |
yep. you're right. must have been an oversight of switching from amqplib to node-amqp (done because amqplib opens a channel for every consumer, whereas I wanted one for send and one for receive). Care to make a PR? |
I can't seem to figure out how to pass it the proper options to get the Delayed Message Plugin to work properly when using servicebus.
My current attempt is as follows:
Consumer:
Producer:
The message sends and is received by the listener immediately (~100ms).
I'm wondering if I am not providing the information correctly on the
headers
on thesend
or withexchangeOptions
on thelisten
. Or perhaps servicebus just doesn't support propagating these settings into the RabbitMQ queue/message properly.Any help is appreciated.
The text was updated successfully, but these errors were encountered: