Reading Azure Service Bus Queue

后端 未结 2 869
既然无缘
既然无缘 2020-12-22 01:13

I\'m simply trying to work out how best to retrieve messages as quickly as possible from an Azure Service Bus Queue.

I was shocked that there wasn\'t some way to pr

2条回答
  •  既然无缘
    2020-12-22 01:36

    To deal with Azure ServiceBus Queue easily, the best option seems to be Azure Webjob.

    There is a ServiceBusTrigger that allows you to get messages from an Azure ServiceBus queue.

    For node.js integration, you should have a look at Azure Function. It is built on top of the webjob SDK and have node.js integration :

    • Azure Functions NodeJS developer reference
    • Azure Functions Service Bus triggers and bindings for queues and topics

    In the second article, there is an example on how get messages from a queue using Azure Function and nodejs :

    module.exports = function(context, myQueueItem) {
        context.log('Node.js ServiceBus queue trigger function processed message', myQueueItem);
        context.done();
    };
    

提交回复
热议问题