|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MessageId Problem -- Urgent |
« View previous topic :: View next topic » |
Author |
Message
|
Syams |
Posted: Mon Dec 08, 2003 8:24 pm Post subject: MessageId Problem -- Urgent |
|
|
Novice
Joined: 08 Jul 2003 Posts: 10
|
Hi,
I have a repository based java application, which sends message to MQSeries by setting the messageid through my program and waiting for the Response message to be received in my response queue with the same messageid.
Now the problem I am facing is, when my program sets the messageid, it's orginal hexadecimal value is of 50 characters length(something like this: 414D5120494C534150312020202020203FCE09B420002A0100), where as when i try to get the messageid of message in response queue, I get it of 48 characters, as MQSeries supports MQBYTE(24) messageid, which can be converted to 48 character length hexadecimal value(something like this:414D5120494C534150312020202020203FCE09B420002A01). I am getting the messageid value same as that of first 48 characters of the value I am setting for the request message. But the problem comes when my program looks for the messageid having 50 character hexadecimal value, hence throughs the exception of MQRC_NO_MSG_AVAILABLE, as is not able to exactly match the values (though first 48 characters are same).
So is there a way out to handle such situation(i.e changing the messageid length fom 48 to 50 with any MQSeries configuration or API) at MQSeries end, as i don't have control to manipulate it in my java code.
Regards,
Naru |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Dec 09, 2003 5:28 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The message ID field only holds 24 binary characters, which you can turn into 48 hex characters (as you said).
The only people who can change this are IBM. And I doubt they will. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Nathan |
Posted: Tue Dec 09, 2003 6:07 am Post subject: |
|
|
 Acolyte
Joined: 15 Sep 2003 Posts: 52 Location: Rochester, NY
|
Your put application should remember the MsgID for the message it creates. Then look for the return message by comparing the saved MsgID with the Correlation ID. Another application should copy the MsgID to the CID field. |
|
Back to top |
|
 |
clindsey |
Posted: Tue Dec 09, 2003 6:23 am Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
First, we need to clarify the semantics in your problem description. I believe it is not 50 hex "characters", but 50 nibbles or half bytes which makes it 25 bytes.
As pointed out, the message id is 24 bytes so you need one extra byte. Do you control the application that supplies the reply? If you do, then one solution is to put the 1st 25 bytes in the message id and the last byte in the correl id field. The server side application must copy both the message id and correl id fields into the reply. Then you can match on both message id and correl id which allows you to match on all 25 bytes of your id.
Charlie |
|
Back to top |
|
 |
Praveen |
Posted: Wed Dec 10, 2003 3:53 am Post subject: |
|
|
 Apprentice
Joined: 23 Oct 2002 Posts: 40 Location: Bangalore
|
You can get your message by matching the messageId, following piece of code may help you..
Code: |
MQMessage outMessage = new MQMessage();
outMessage.messageId = inMessage.messageId;
MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.matchOptions = MQC.MQMO_MATCH_MSG_ID;
OutQueue.get(outMessage, gmo);
OutQueue.get(outMessage, gmo);
String msgTxt = outMessage.readString(outMessage.getMessageLength());
System.out.println (" The message is \n" + msgTxt);
|
Praveen K |
|
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
|
|
|
|