Hi, I'm attempting to run as an RPC using the Request/Reply socket types. Everything is working great, until it is time to respond back with a message. I've tried responding directly back to the replyTo, but I'm getting:
Error: Channel closed by server: 403 (ACCESS-REFUSED) with message "ACCESS_REFUSED - queue name 'amq.gen-sMgjS-5c4qvKKR2ArMhKTA' contains reserved prefix 'amq.*'
Which makes sense that it's a reserved queue name. But if I can't write to it, how do I reply?
Request:
context.on("ready", function () {
var request = context.socket("REQ", {expiration: TIMEOUT});
request.setEncoding('utf8');
request.on("data", function (message) {
process.nextTick(function () {
request.close();
res.send(message, {});
});
});
request.connect("RPCQueueName", function () {
var message = JSON.stringify(req.body);
console.log(request);
request.write(message, "utf8");
});
});
I've tried messing with the replyTo and correlationId to no avail. Do you know of any ways to reply directly to an AMPQ queue - or another method?
In your documentation you wrote:
If you are replying via AMQP or STOMP, be sure to follow the convention of sending the response to the queue given in the 'replyTo' property of the request message, and copying the 'correlationId' property from the request in the reply. If you are requesting via AMQP or STOMP, at least supply a replyTo, and consider supplying a correlationId.
Can you provide an example of how to correctly supply the replyTo and correlationId for the request and how to best follow the convention of sending the response to the queue? I've been scouring the docs for days with no luck. Thanks!
Hi, I'm attempting to run as an RPC using the Request/Reply socket types. Everything is working great, until it is time to respond back with a message. I've tried responding directly back to the replyTo, but I'm getting:
Error: Channel closed by server: 403 (ACCESS-REFUSED) with message "ACCESS_REFUSED - queue name 'amq.gen-sMgjS-5c4qvKKR2ArMhKTA' contains reserved prefix 'amq.*'
Which makes sense that it's a reserved queue name. But if I can't write to it, how do I reply?
Request:
Reply:
I've tried messing with the replyTo and correlationId to no avail. Do you know of any ways to reply directly to an AMPQ queue - or another method?
In your documentation you wrote:
If you are replying via AMQP or STOMP, be sure to follow the convention of sending the response to the queue given in the 'replyTo' property of the request message, and copying the 'correlationId' property from the request in the reply. If you are requesting via AMQP or STOMP, at least supply a replyTo, and consider supplying a correlationId.
Can you provide an example of how to correctly supply the replyTo and correlationId for the request and how to best follow the convention of sending the response to the queue? I've been scouring the docs for days with no luck. Thanks!