|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WMQI 2.1 - Optional Message Sets? |
« View previous topic :: View next topic » |
Author |
Message
|
ROX |
Posted: Thu Jul 27, 2006 1:40 am Post subject: WMQI 2.1 - Optional Message Sets? |
|
|
Newbie
Joined: 11 May 2005 Posts: 7
|
Hi Guys,
How can i build a message set that will be able to accept input from the input queue where incoming messages are differing in lenght [i want to use the MRM domain].
I have to accept either message of Lengh 16 or of length 19 - how can i 'tell' the MRM to ALTENATE between using MessageSet_Type_16 [for the lengh 16 message] and MessageSet_Type19[for the length 19 message].
these logic is easilly achievable when using the NEON domain [by using the OPTIONAL FORMATT check box] i want to remove my dependace on these domain [as i will be upgrading to WMB 6.0 next year!]
regards Rox |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jul 27, 2006 2:59 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You can use a CHOICE composition type.
So your top level message would hold a single instance complex type that had a CHOICE composition.
Then either in your ESQL you would be able to tell wihch message size you got and resolve the choice, or if your message is TAGGED then the parser can resolve the choice for you.
That is, you have to be able to tell someway or another what type the message is. If the way you tell this is something that the parser can understand, then the parser can automatically determine which message type has come in. Otherwise, you have to write ESQL code to figure this out. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jul 27, 2006 4:27 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Hi,
More information would be useful. You don't say whether the messages contain an indicator field which identifies each message.
Either way, the best solution is to add an MQRFH2 header to each message indicating which message type to use. This solution can only work if you have control over the application which puts the messages on the queue.
Alternatively, you could parse the message as a BLOB, inspect the length, and set the message properties accordingly. Then re-parse the message using the MRM parser. |
|
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
|
|
|
|