|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
The use of correlation Ids |
« View previous topic :: View next topic » |
Author |
Message
|
Pat Fleming |
Posted: Thu Oct 16, 2003 8:21 am Post subject: The use of correlation Ids |
|
|
Newbie
Joined: 16 Oct 2003 Posts: 8
|
Hi All,
I am having an issue with MQ seemingly changing some nonprintable characters in MsgId field into question marks. If MQ generates the MsgId with these characters in, it seems to be happy with them. However if I assign the MsgId "manually" with some nonprintable characters in, it changes some to question marks (3F) and not others.
Below is an example of this. My server is assigning the MsgId on the message received from the client into the CorrelId field of the reply so that the client can match the response with the request. Sometimes it matches and sometimes it doesn't, because of this problem. My client is running 5.3 while my server is running 5.2.
MsgId 414D512042524C54383537383320202052->8986<-3F20000501
CorrelId 414D512042524C54383537383320202052->3F3F<-3F20000501
Any body got any ideas what I might be doing wrong?
Thanks
Pat |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Oct 16, 2003 10:30 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
How are you assigning the ids?
What language?
What platform?
Can we see your code? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Pat Fleming |
Posted: Fri Oct 17, 2003 1:01 am Post subject: |
|
|
Newbie
Joined: 16 Oct 2003 Posts: 8
|
Sorry about the lack of information
I am using MQAX200 in c# on win2k on the client and am using an EAI tool with an MQ adapter on the server. This too is a win2k platform. There is a queue manager on both client an server and I am using remote queues on each side.
As far as the MsgId goes the behaviour of MQ as I described appears to be the same on both client and server, that is, if a MsgId with characters it doesn't like is generated by MQ on the client, the server, because it reads the incoming MsgId and assigns it to the outgoing CorrelId field as a string, changes these undesirable characters to 3F and consequently the client fails to match it.
The example MsgId is a generated one.
In testing, MsgIds with bad characters are assigned to the MessageId property of the Message (MQAX200.IMQMessage500) as a String in the debugger on the client. The assignment, prior to the PUT, causes these characters to change to 3F and this can be seen in the MessageIdHex property of the Message. Because the assignment takes place in the client and is not generated by MQ the server doesn't change it when assigning it to the CorrelId field as it has already been changed in the client. The client can then match this.
The MessageIdHex property of the Message seems to be a hex representation of the MessageId property.
Thanks a lot for the help and hope this clarifies things. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Oct 17, 2003 5:41 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Quote: |
I am using MQAX200 in c# on win2k on the client |
Quote: |
In testing, MsgIds with bad characters are assigned to the MessageId property of the Message (MQAX200.IMQMessage500) as a String in the debugger on the client |
It's not clear, but it seems like you are developing the client app yourself?
As you have seen, the MessageID field is a binary 24-byte long field. You should not be working with it as a String at all, and certainly not assigning it as a String. It's a byte array.
The property in the MQAX200 interface that contains a binary-to-hex String representation of the Message ID, as you have found out, is the MessageIDHex.
In fact, if you read the "Messade Descriptor properties" section in Chapter 2 of "Using the Component Object Model Interface", it says
Quote: |
Where an Websphere MQ Application is the originator of a message, and Websphere MQ generates the AccountingToken, CorrelationId,GroupId,MessageId you are recommended to use the AccountingToken Hex, CorrellationIDHex, GroupIdHex, and MessageIdHex properties if you want to look at their values, or manipulate them in any way- including passing them back in a message to Websphere MQ. The reason for this is that Websphere MQ generated values are strings of bytes that have any value from 0 through 255 inclusive, they are not strings of printable characters. |
(phew - and my emphasis)
If you have installed the Websphere MQ Information Center, then you can get at the "Using the Component Model Interface" manual from there. Otherwise, click on the 'Documentation' button at the top of this screen, and go to "Latest Platform specific guides". _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|