Secret of MSMQ adapter in BizTalk

For one of our customer we ran into this unique issue in DR environment during DR drill preparation.

The traces for one of the EAI application shows the delay of more than 10 seconds in BizTalk and the same application is working fine in other environments (UAT & PROD).

Traces
After further investigation we found the delay was from the time message gets into MSMQ to the time it is picked up by MSMQ adapter inside BizTalk.

Traces1

We also tested the MSMQ independently for send/receive and it did not take much time.

Finally after doing some research work we came to know about of this secret of MSMQ adapter. The MSMQ adapter is designed in such a way that it will either wait for the batch size of 20 messages or wait for 10 seconds before it timeouts and process the incoming messages, whichever occurs first.

In our case the batch size of the MSMQ adapter for the application was 20 in DR environment and it is 1 in LIVE.  And we were testing the application only with a single message instead of a batch of 20 messages. Therefore, we see the 10 sec delay every time when the number of message is less than 20. When we changed the batch size to 1 then the delay of 10 sec was resolved.

Resource:

http://blogs.msdn.com/b/biztalknotes/archive/2013/10/02/delay-while-picking-message-using-msmq-adapter-in-biztalk-server-2010.aspx

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s