BizTalk and Windows Azure Service Bus as Relay
Recently, I presented a webinar “Secure Integration Messaging with BizTalk and Windows Azure Service Bus (formerly known as AppFabric Service Bus).
I’d like to take some time and walk through creating the solution. In this webinar, I demonstrated how to process inbound orders from external trading partners into our on-premise middle-ware platform (which routes orders to the fulfillment order processing systems). One of the key components to solving this integration problem was Windows Azure Service Bus. The Windows Azure Service Bus exposes an endpoint and acts as a relay service to external endpoints. BizTalk 2010 can now natively connect to the Service Bus using the AppFabric Connect feature. This feature can be installed from the BizTalk 2010 installation media.
Here is the overall architecture:
Below illustrates the integrated external B2B partners into our internal LOB systems flow…
I’ll walk you through how I created this simple solution:
1) Create a BizTalk orchestration that has a request/response two-way logical receive port. In this orchestration, I am receiving a purchase order, evaluating the region of the type of order, and sending it to that location (east, west).
2) Create a Windows Azure Service Bus endpoint to connect to
3) Publish the BizTalk Orchestration as a WCF Service (remember that the logical port name will be the method name so use something other than the default ‘Operation 1′). Use the BizTalk WCF Publishing Wizard to create the service on the localhost and create the WCF BizTalk bindings. Note, after installing the AppFabric Connect BizTalk feature, you will have a few new screens to create the connection between WCF Service and the Service Bus relay.
Next, download and install the Windows Server AppFabric (not to be confused with the legacy Windows Azure AppFabric). This is basically a set of tools that allow easy application specific IIS coniguration. This is especially helpful in this case, because we want to make sure that our WCF Service Auto Start is on.
Deploy the BizTalk application and set up the bindings.
Next, all we need is a client service that submits orders to our Service Bus endpoint. First, add the WCF Service reference to proxy out the classes. Next, insert this code into a console application.
Run the client program and the Service Bus relay should send the message to your localhost IIS service, via the WCF Adapter where BizTalk subscribes to the message when it hits the messagebox.
The amazing piece to me, is that all of this is running on my laptop behind my company firewall!! Thanks Service Bus!
Download the presentation if you need any additional information on how to do your own proof of concept.