Hybrid Integration can allow us to work and combine both on-premise and cloud integration. Moving everything to cloud might not be the best solution but making the use of hybrid integration will deliver flawless stability for enterprises that integrates data from on-premise to cloud data and guaranteeing that businesses have full benefit when going ahead.
In this example we are going to send a message on a service bus queue via Postman which will be later picked up by on-premise BizTalk Server using SB-Messaging adapter.
The only problem with the Service Bus Queue is the maximum message size depend on the pricing tier you choose. Even if you go with the premium tier – the max allowed size is 1024 KB and for the Premium tier you end of paying a lot.
Steps we would be carrying out are as follows –
- Create Azure Service Bus and Queue
- Create a Policy (Manage, Listen, Send) messages from Queue
- Configure BizTalk receive port with SB-Messaging adapter
- .Net code to generate sasToken
- Test – Postman
Create Azure Service Bus & Queue
Login to you Azure portal and create service bus namespace.
Once the namespace is created navigate to the blade and under entities select Queues and create one.
Create Azure Shared Access Policies
Navigate to the Queue created and click on – Shared access policies and create one. We will be using the same policy for managing both receive and send. Once the policy is created you will have a primary and secondary connection strings. Copy the Primary key and connection string as we would be needing it for BizTalk port configuration.
Configure BizTalk receive port with SB-Messaging adapter
In the Authentication tab select Shared Access Signature and specify Shared Access Key Name and Shared Access Key.
For test purpose create a Send port which subscribes to the above receive port and save the messages to a file location.
.Net code to generate sasToken
Create a simple .net console application to create a sasToken which will be used in our Postman header property Authorization key.
I have used the code for sasToken from the Microsoft link.
Test – Postman
Now the final step is configuring postman with necessary URL and header properties and trigger message which will land on service bus queue. This message will be picked by BizTalk SB-Messaging adapter and send to a file share location.
In Header specify Authorization and paste the value we generated from above code. We are sending a json message as the input, so specify the Content-Type as application/json.
You can also monitor your Service Bus from the overview tab for incoming / outgoing messages and no of successfully and failed request.