Author |
Message
|
KSkelton |
Posted: Thu Apr 03, 2003 9:38 am Post subject: Parsing multiple MRM/CWF message types from one Message Flow |
|
|
Apprentice
Joined: 28 Oct 2001 Posts: 45
|
WMQI 2.1 CSD2
Hi,
I have a need to parse and format/route multiple message types arriving on a single queue.
The question is what is the best way to handle this?
My first inclination is to use an empty input node to parse as BLOB and then run the message through a series of CHECK nodes. The message would fail to parse, and try the next Check node etc....
I believe there may be a chance of error here if a similar message accidentally parses into an incorrect message set and gets routed down the wrong path?
The other idea was since I have an application identifier in the body of the message, I could interrogate this first and then pass the message to the correct MRM parser.
How would this be done? Would I have a group of filter nodes that somehow do a BLOB substring to read the message before parsing?
Any ideas welcome. |
|
Back to top |
|
 |
kirani |
Posted: Thu Apr 03, 2003 9:49 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
You have multiple choices here,
1. The client application sets MQMD.ApplIdentityData to some unique value. Your message flow reads input messages as BLOB and then looks into this field to set RouterList to route message to appropriate destination (Label Node). You will then apply appropriate parser on this message for further processing.
2. Client applications send some kind of application header within the message. You can then read the input message as BLOB and then interrogate it apply appropriate parser (similar to what you described in your post).
I'd prefer option 1. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Apr 03, 2003 9:50 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I think the typical pattern is to use your application identifier as you indicated. You read the message from the queue as a BLOB, and then extract your application identifier using substring or something. Then use your application identifier to assign either a destination queue or a label for a RouteToLabel node. Using nested filter nodes is not a good idea performance wise for more than about two layers. |
|
Back to top |
|
 |
KSkelton |
Posted: Thu Apr 03, 2003 11:26 am Post subject: |
|
|
Apprentice
Joined: 28 Oct 2001 Posts: 45
|
Thanks, that clears up most of my questions.
One more thing. After the routing is done I will need to parse the input message before formatting. Is the best way to do this with a ResetContentDiscriptor node followed by a compute node? Or is there a way to have the Compute node parse the message itself? |
|
Back to top |
|
 |
yaakovd |
Posted: Thu Apr 03, 2003 12:38 pm Post subject: |
|
|
Partisan
Joined: 20 Jan 2003 Posts: 319 Location: Israel
|
You need RCD node before.
Compute node must have known message tree, if you want to work with message body. _________________ Best regards.
Yaakov
SWG, IBM Commerce, Israel |
|
Back to top |
|
 |
|