Have you seen this article? http://msdn.microsoft.com/en-us/library/aa560725.aspx
This article shows how to programmatically set the MSMQ receive location; in addition, it provides access to additional properties that may be necessary but not shown by the BizTalk adapter by default - (for example, Extension).
ManagementClass objReceiveLocationClass = new ManagementClass( "root\\MicrosoftBizTalkServer", "MSBTS_ReceiveLocation", null); // Create an instance of the member of the class ManagementObject objReceiveLocation = objReceiveLocationClass.CreateInstance(); // Fill in the properties objReceiveLocation["Name"] = name; objReceiveLocation["ReceivePortName"] = port; objReceiveLocation["AdapterName"] = adapterName; objReceiveLocation["HostName"] = hostName; objReceiveLocation["PipelineName"] = pipeline; objReceiveLocation["CustomCfg"] = customCfg; objReceiveLocation["IsDisabled"] = true; objReceiveLocation["InBoundTransportURL"] = inboundTransport; // Put the options -- creates the receive location objReceiveLocation.Put(options);
EDIT:
After decompiling the BizTalk MSMQ adapter code to the interface level, I see no way to do this using the default adapter. The adapter cannot be extended either as it is sealed.
The only other options I found are
EDIT: (The reason you SHOULD NOT set the extension property)
The Extension property is used to bind large messages together that are fragmented in the transport if the total message size exceeds 4 MB. This is done under the covers, and if crawling can damage large messages.
To participate in large message exchanges, the Mqrtlarge.dll file must be installed on the computer with the message queue, and the application for message queues must use additional APIs. Otherwise, complete messages will be fragmented.
BizTalk 2004 Extended Message Documentation
BizTalk 2010 High Volume Extensibility Documentation
source share