Search code examples
biztalkbiztalk-2013azure-storage-queues

Listen to Azure Queue from BizTalk


I've been attempting this for a couple of weeks now. It's a pretty simple concept.

I just want to read messages off of an Azure cloud queue (Not a service buss!) from a local installation of BizTalk Server 2013 R2 and then allow BizTalk to do something with that message on our internal network. I am following this sort of example for creating a port to the Azure Queue:

http://social.technet.microsoft.com/wiki/contents/articles/20211.biztalk-server-2013-connect-to-window-azure-blob-storage.aspx

In my case, this needs to be a receive (it will be receiving queue messages). So, I have a receive location which is a WCF-WebHttp adapter pointed to: https://myappname.queue.core.windows.net/ with operations like:

 <Operation Name="Query" Method="Get" Url="/myqueue/messages"/>
 <Operation Name="Remove" Method="Delete" Url="/myqueue/messages"/>

That doesn't seem to magically do anything, and i'm not sure how I would initiate a read call to the Azure queue from BizTalk. Do I need to initiate a polling message of some sort? How would I do that with a WCF-WebHttp adapter port?

Maybe the question is: How do I make the orchestration which starts with a WCF-WebHttp receive location do something? Ie. how do I make it poll the queue / what should I be starting the orchestration with?


Solution

  • WCF-WebHttp doesn't have any built in polling mechanism. You'll have to create or simulate one.

    You'll need to do some custom implementation for this at this point. There are a lot of different options, but I'd probably go with something like one of these.

    1. Use the Scheduled Task Adapter to send the GET requests to the queue endpoint and publish that message to the MessageBox
    2. Create a Windows Service or a scheduled job (Powershell maybe?) that does the polling and writes any messages to something (probably either MSMQ or a file location) that BizTalk can consume automatically