This is my code:
// send to queue
channel.sendToQueue("test", data);
After publish test
, on another server we get a response from that server
So, I want to await for it and get with await:
await channel.consume("response", async (msg) => {
....
})
But await not work here
How can I await for consume?
My full code:
channel.sendToQueue("test", data);
await channel.consume("response", async (msg) => {
....
})
// continue code