| ChenJh 2005-04-19, 5:55 pm |
| Hi,
I have a problem setting the MSMQ Correlation ID in BizTalk.
I am using MSMQ adapter (not msmqt) in Biztalk to communicate with .NET
Application. Here is my scenario:
1. .NET application sends a request to BizTalk server through MSMQ.
2. BizTalk orchestration receives the request and run some processes;
3. BizTalk orchestration creates a response message, and sends it to .Net
application through a Response queue(MSMQ).
Before it sends the message, it does the following using MessageAssignment:
SendMsg(MSMQ.CorrelationId)=ReceiveMsg(MSMQ.Id);
I believe this expression should copy the message Id from the request
message into the correlationId of the response message.
4. .Net application waits for the response using following method:
responseQueue.ReceiveByCorrelationId(sendMsg.Id, .....)
During my testing, the biztalk server sends the response message into the
response Queue. But the .net application never receives it. Here is what I
found:
- The correlation ID in the Response message is not the same as the Id of
the initial request message. The last digit is being trimmed.
For example: Request message Id is <guid>/4922754
Response Message CorrelationId is <guid>/492275
Is this a bug in BizTalk/MSMQ adapter? Or is there a specific configuration
need to be set on MSMQ server, BizTalk orchestration, etc...
Is there a length limit on correlation ID? The MSMQ id and correlationId
are both 20-bytes field.
If the .net application also trims the last digit when it waits for the
response, it works OK in my scenario. But this is a hack. Is there a better
way to resolve this?
Thanks in advance for any help.
Jeff
|