|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Problems with correlId and .net |
« View previous topic :: View next topic » |
Author |
Message
|
varholl |
Posted: Mon Jun 12, 2006 10:26 am Post subject: Problems with correlId and .net |
|
|
Novice
Joined: 23 May 2006 Posts: 21 Location: Argentina
|
Hello friends, i'm having some troubles with the correlId of the messages, it seems that MQ takes the correlId and the msgId in Hexadecimal format, but in the .net api its an array of bytes, this is giving me problems to take the responses of the messeges, and i dont know why.., first of all i create a new message, and i took its msgId (obviously in byte array format), and then i create a new msgid for the response and i assign the msgid to the new response message, and when i'm trying to get the message i get nothing, i get the error MQRC_NO_MSG_AVAILABLE
Can you help me anyone PLEASE???!!!! _________________ Consulting on web based Systems. |
|
Back to top |
|
 |
tleichen |
Posted: Mon Jun 12, 2006 11:34 am Post subject: Re: Problems with correlId and .net |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
varholl wrote: |
first of all i create a new message, and i took its msgId (obviously in byte array format), and then i create a new msgid for the response and i assign the msgid to the new response message, and when i'm trying to get the message i get nothing, i get the error MQRC_NO_MSG_AVAILABLE
Can you help me anyone PLEASE???!!!! |
Not sure what you mean by Hexadecimal format.... It's simply binary. 24 bytes of binary, to be exact. There is no distinction between this and an array of bytes, but you need to remember that they are not character data.
You need to set the correllid on the get (not the msgid) to the msgid of the originating request. The msgid should be zeros (typically). The qmgr will then use the correllid and match this up with a msgid that is in the queue. This is laid out in the programmer's guide, too.  _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jun 12, 2006 7:35 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You say you are using .NET. If you are trying to convert some string into a byte array make sure you use the right environment. The default would be unicode (2 bytes per char) and not UTF-8.
MQ only compares the byte arrays (byte by byte?) and does not care about any strings as these values (msgid, correlid) are defined as byte arrays.
Enjoy  _________________ MQ & Broker admin |
|
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
|
|
|
|