Feature Request: sendToQueue
See original GitHub issueI may end up working on this but the feature request is to implement a sendToQueue
function that should work just like the publish function except it’ll go to whatever queue you send the message to. So instead of relying on the routingKey you can have it sent directly to a queue.
Documentation for sendToQueue http://www.squaremobius.net/amqp.node/channel_api.html#channel_sendToQueue
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
amqplib | Channel API reference - GitHub Pages
Writable when you call publish or sendToQueue : they return either true , meaning “keep sending”, or false , meaning “please wait for...
Read more >Feature Request - timeout for publish and sendToQueue
I've noticed that if the client cannot connect, calling to sendToQueue from the channel wrapper creates a promise that never resolves or ...
Read more >amqplib.Channel.sendToQueue JavaScript and Node.js code ...
How to use. sendToQueue. function. in. Channel. Best JavaScript code snippets using amqplib.Channel.
Read more >sendToQueue procedure - Progress Documentation
Sends a message to a queue. Syntax PROCEDURE sendToQueue. DEFINE INPUT PARAMETER queueName AS CHARACTER. DEFINE INPUT PARAMETER message AS HANDLE.
Read more >RabbitMQ sendtoQueue and consume in the same rest api call
In one particular endpoint for product service data is first send to Bid queue where it is processed in Bid service and after...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
when you send to queue, you are publishing through an exchange and exchanges require a routing key.
the exchange happens to be a special, built-in exchange, but it’s still an exchange.
this specialized exchange receives the queue name as the routing key, and uses that to route the message through the exchange and to the correct queue.
send to queue is useful when you are doing replies and a few other very specific scenarios. but in general, i considered it an anti-pattern that just makes demo code look easier.
it’s a rather deceptive implementation that caused me a lot of confusion when i first started learning RMQ.
In addition to what @derickbailey said…in RabbitMQ all messages route through some kind of exchange. You can use direct exchanges to achieve the “straight to queue” functionality @rg1220
The built-in default exchange is a direct exchange. Additionally, every queue that is created is automatically bound to the direct exchange with the routing key of the queue name. This means that if you publish a message to the default exchange and use your destination queue as the routing key, it will be delivered to that queue.
https://www.rabbitmq.com/tutorials/amqp-concepts.html