|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Can we use "{}" in the MQMD - Message ID |
« View previous topic :: View next topic » |
Author |
Message
|
raghav |
Posted: Wed Jun 15, 2005 10:43 am Post subject: Can we use "{}" in the MQMD - Message ID |
|
|
Novice
Joined: 15 Apr 2005 Posts: 24
|
Is it possible to use special characters such as '"{}: when setting the Message ID..?
For example:
MQMD.MsgId = "{0123:ABC**********}"; |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 15, 2005 10:46 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You can use binary zero when setting a message ID - it's a byte array.
But you shouldn't set a message ID.
Treating a queue like a database is an antipattern. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
raghav |
Posted: Wed Jun 15, 2005 3:59 pm Post subject: |
|
|
Novice
Joined: 15 Apr 2005 Posts: 24
|
Can we provide a pattern to the Message ID?
For example, setting the first 4-5 bytes as:
char pattern[24] ;
strcpy(pattern, "{AMQ}");
convert field pattern into a byte string and assign it to MQMD.MsgId.
Is it advisible to do this..? |
|
Back to top |
|
 |
wschutz |
Posted: Wed Jun 15, 2005 4:18 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
You CAN do strcpy(MQMD.MsgID, "{0123:ABC**********}"); and that will certainly work. But be aware, that MQ will not translate the MsgId (nor the CorrelID) fields, so if you ae sending the message from an ASCII to EBCDIC platform, it will not be converted for you.
Why do you want to do this? Perhaps if you told us what you're trying to accomplish, a better solution can be suggested.
-w |
|
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
|
|
|
|