

Each Send Port will have a filter for the corresponding Receive Port.The purpose of these Receive Locations is to simply inject messages into BizTalk so that we can set the SessionID property on the Send Ports. A Receive Location for each Receive Port.In order to keep the solution very simple, we will create: NamespaceClient.CreateQueue(queueDescription) QueueDescription queueDescription = new QueueDescription(Sender.QueueName)

If (!namespaceClient.QueueExists(Sender.QueueName)) NamespaceManager namespaceClient = new NamespaceManager(serviceUri, credentials) When using the QueueDescription class we can set the RequiresSession property to true.When creating a queue from within the Azure Portal, we can check the Enable sessions checkbox.This can be enabled in a couple different ways: Putting it together – Modifying Service Bus QueueĪ pre-requisite for this type of messaging scenario to work is configuring our Service Bus Queue to support Sessions. For instance he may have driven by one of his customers already because the messages that he receive were out of order and other field workers were also receiving their orders which delayed him in receiving all of his. For instance if we wanted to load up a field worker with all of his orders, wouldn’t it be nice to have all of his orders sent to him as a batch? As opposed to him receiving some of his orders only to receive more orders later on. A scenario that I came up with is dispatching messages. Supporting Service Bus Sessions is just another tool in the the BizTalk toolbox for supporting new requirements. Why are Service Bus Sessions important in BizTalk processing?īizTalk deals with a variety of different messaging scenarios in many different industry verticals. I am not suggesting that this approach be used instead of Service Bus Topics/Subscriptions, but there may be a specific business requirement to do this. So in some ways a Session can be used almost like a filter. Within a receiver, you can specify an explicit Session that you are interested in. In some scenarios, using a Service Bus Session allows for routing of messages.In this scenario, once a receiver has started to process a message within a session, that consumer will process all messages within that session barring some sort of application crash. One can expect the messages to be distributed amongst the clients as each consumer “competes” for the right to process a particular message. Under normal circumstances you cannot be assured that one receiver will receive all messages within a message set. Imagine having 3 consuming clients all trying to receive messages from the same Service Bus Queue.

