Closed mzeiher closed 11 months ago
I noticed this "overwritten" for exchange, but the exchange configured here is not used when actually sending the message. If you want to "call on other exchanges", you need to configure the exchange to be sent. Please provide more information if I'm misunderstanding you.
in rpc scenarios you usually create an autodelete queue for receiving messages and add a routing key, usually the defult direct exchange (empty string) has an implicit binding for the routing key to the queue for receiving messages, so if you get a message with replyTo
Suppose there is now a "test_queue" on the mq proxy bound to "testexchange" (direct), the bind key is "test key" Your program wants to listen to the test_queue , do some logical processing when it receives a message, and send the result to the "replyTo" queue.
In this case, you should configure the amqp-out node with the
At this moment, the amqp-out node listens to the replyTo queue, to which your program can send messages. In your question "...possible to set a specific exchange". Do you want to specify the exchange when you send the message or do you want to specify the queue at reply time in your program. If the former, I think it's currently possible to implement sending messages to a specific exchange, with a specific queue. If the latter, this should be specified in your program. I apologize if I misunderstood your question, please provide me with more information!
Hi, with the current implementation RPC calls are only possible on the default exchange, because the exchange name is always overwritten with "": https://github.com/Stormpass/node-red-contrib-amqp/blob/3ee9e0ef7dadd30d8eefb8f36050e4a7fc5eb329/src/Amqp.ts#L201C33-L201C33
Maybe to also be able to do rpc calls on other exchanges this line should be changed?