Thursday 31 May 2018

Node callback fires only once.

I'm using Azure service bus to send messages across containers in my K8s setup. Implementation of service that receives message is done in Node.js.From the doc page, here is the code I'm using to receive the messages.serviceBusService.receiveQueueMessage('feedback', function(error, receivedMessage) {if (!error) {// Message received and deletedconsole.log(receivedMessage);//..}});Everything works as expected for the first time but the messages are not received for the second time. It works as expected when the code snippet is kept inside the `setInterval` block. Which seems not the intended way of doing this.Any ideas what could be wrong?

Submitted May 31, 2018 at 12:53PM by ash1729

No comments:

Post a Comment