Reading Azure Service Bus Queue

后端 未结 2 872
既然无缘
既然无缘 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:53

    Check out these videos from Scott Hanselman and Mark Simms on Azure Queues. It's C# but you get the idea.

    https://channel9.msdn.com/Search?term=azure%20queues%20simms#ch9Search

    Touches on:

    • Storage Queues vs. Service Bus Queues
    • Grabbing messages in bulk vs. one by one (chunky vs. chatty)
    • Dealing with poison messages (bad actors)
    • Misc implementation details
    • Much more stuff i can't remember now

    As for your compute, you can either do a VM, a Worker Role (Cloud Services), App Service Webjobs, or Azure Functions.

    The Webjobs SDK and Azure Functions bot have a way to subscribe to Queue events (notify on message).

    (Listed from IaaS to PaaS to FaaS - Azure Functions - if such a thing exists).

    Azure Functions already has sample code provided as templates to do all that with Node. Just make a new Function and follow the wizard.

    If you need to touch data on-prem you either need to look at integrating with a VNET that has site-to-site connectivity back to your prem, or Hybrid Connections (App Service only!). Azure Functions can't do that yet, but every other compute is a go.

    https://azure.microsoft.com/en-us/documentation/articles/web-sites-hybrid-connection-get-started/ (That tutorial is Windows only but you can pull data from any OS. The Hybrid Connection Manager has to live on a Windows box, but then it acts as a reverse proxy to any host on your network).

提交回复
热议问题