So I was bound and determined to find out the behavior of how BizTalk handles the order of messages.

I created the following flow within BizTalk. This is a two step process. BizTalk gets messages, distributes them to three different subscribers, three send ports and one orchestration.

Here is the flow:

image

So the MLLP receive location looks like this:

image

The non-ordered send port simply does not have the following check mark

image

The ordered send port looks like this:

image

The orchestration looks like this: I put an atomic scope shape so that I wouldn’t pick up the same message, as I was filtering off of the InboundTransportLocation. So in the orchestration, I changed the inbound transport location to localhost:99999 so no other orchestrations would pick it up, and I simply could bind the send port to the logical port.

image

Things I discovered:

The unordered send port runs fast, however, as you can see from the messages. They are definitely not in any order…

image

The ordered delivery send port does keep the messages in the right order. However, look at how long it takes to process those messages! It is nearly 2-3 seconds between messages! As I was watching the active send port, looking at the messages, I could see the messages slowly leaving.

image

Here are the times it took to process each of the messages

image

The Orchestration process keeps the order intact, and processes the messages just as fast as the unordered send port.

image

It is apparent that the check mark for ordered delivery in the send port is executing different logic than the orchestration that has the same ordered delivery setting.

My recommendations is to use a convoy orchestration to order the messages and send them on.

Ordered Delivery

 Uncategorized  Comments Off
May 022012
 

So today I was questioned about how to setup ordered delivery using the MLLP adapter. I decided to put together a sample demo, to make sure that I remembered how to do it.

The first thing I did was put together a batch of 20 messages. Each message had a different control number, along with the same control number in the EVN segment.

image

The next thing I did was setup the receive location

image

So I ran all of the files into BizTalk

image

I had the send port stopped so I could see what went on. I turned on tracking so I can look into the message. I ran the following query and this is what I got

image

If I look at the first message (11:13:23.573) I see this control number:

image

I can look through the messages and confirm that the order is correct. Here is the last message (11:13:23.767)

image

So I created an orchestration to process these messages. I set the port to pick up messages off the message box set the Ordered Delivery to True and proceeded to log the number of the message (an internal integer that increases for each message) and the control number from the MSH segment.

image

image

Running them again, the event log shows that they are logged in order:

image

image

Hope that this was as fun for you to read as it was for me to put together!

© 2012 HL7 and BizTalk Blog Suffusion theme by Sayontan Sinha