Author |
Message
|
srinivasraom |
Posted: Thu Oct 26, 2006 6:29 pm Post subject: MessageID Representation |
|
|
Apprentice
Joined: 18 May 2006 Posts: 31
|
I wrote a program to fetch a message based on message id. I am able to get message if i set message id which is not hex number. Might be internally it converting to 24 char string(hex number).
I cannot able to get the message using system generated message id which is a hex number.
Any idea how the message id is represented internally. |
|
Back to top |
|
 |
jmac |
Posted: Fri Oct 27, 2006 5:19 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Wrong forum... you will probably get faster results in the MQ API forum _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
srinivasraom |
Posted: Wed Nov 01, 2006 5:17 pm Post subject: |
|
|
Apprentice
Joined: 18 May 2006 Posts: 31
|
if we dont no what is the internal representation of the generated message id, what MQ work flow any one can do with messages.
The question is about internals. |
|
Back to top |
|
 |
jmac |
Posted: Wed Nov 01, 2006 7:03 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
perhaps if you show me the program, I will have some clue as to what you are saying _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
srinivasraom |
Posted: Wed Nov 01, 2006 7:19 pm Post subject: |
|
|
Apprentice
Joined: 18 May 2006 Posts: 31
|
The question was we put some messages into a queue, the MQ will assign a message id by default.
using mq browser program provided by IBM, we can see the message content and message id, using this message id definitely we cannot fetch the program.
Now my question, what should i do for this message id, to fetch the message data. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Wed Nov 01, 2006 7:48 pm Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
|
Back to top |
|
 |
srinivasraom |
Posted: Wed Nov 01, 2006 8:23 pm Post subject: |
|
|
Apprentice
Joined: 18 May 2006 Posts: 31
|
I havent get answer from the URL. Let me put my question in different way:
I have two programs(MQGet, MQPut), in which MQPut is setting the message id given by me. If i give the same message id to MQGet i am able to get the correct message content.
If i make MQ to set message id and if i try to fetch the message using this id, its not coming. I know the reason why its not coming, because the message id which i passing to it is a 48 hex number.
The message id which i set is only 24digt number, might be this also internally converted to 48hex number.
Hope now you know my problem. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Wed Nov 01, 2006 8:51 pm Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Internally MQ treats this as a 24 byte field.
You can't do any string conversion on it, it won't work.
You have to treat this field as a binary feild. There should be no hex at all in your handling of this. In other words...if 000000000000000000000041 is in the messageid field this is not the representation for numeric 65, nor is it the character represented by '41' (A)....it is simply 41
What you are doing (I suspect) is trying to move a 24 character and treat it as hex of string data and it isn't.
Of course if you really feel that MQ is somehow messing your messageid up, raise a PMR with IBM. Strangely I would have definately expected this |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 02, 2006 12:52 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
It's also considered bad practice to try and set message id in this way. At best it's reinventing a wheel, at worst it'll stuff up your MQ!
Do a search on the forum - this has been discussed in the past & some of the threads may offer alternatives to your issue.
But kevinf2349 is entirely right in what he says - it's not a string it's a binary, attempts to treat it as a string are doomed to fail.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|