Author |
Message
|
NewMB |
Posted: Thu Jan 13, 2005 12:46 pm Post subject: Handling diff. length incoming msgs with one queue |
|
|
Apprentice
Joined: 05 Jan 2005 Posts: 42
|
Does Message broker V.5 handle different length incoming messages with one MQInput node (one queue only)? If yes, how?
Thanks! |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jan 13, 2005 1:05 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Broker will parse a message based on one of two things.
If the MQRFH2 header indicates a Message Domain, Message Type, and Message Set Indication, then broker will use those to determine how to parse the message.
If the MQRFH2 header DOES not indicate those things, or is not there, then Broker will use the similar values from the MQInput node.
Most, if not all, of the physical formats that Broker supports (MRM-CVS, MRM-XML, MRM-TDS, XML, BLOB, XMLNS, etc) will support repeating elements, where the repeat count can either be fixed or dynamically determined (in some cases by the parser, and in some cases by the message contents). _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kirani |
Posted: Thu Jan 13, 2005 11:38 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
It also depends on how you would like to utilize the incoming message. To answer your question YES, Broker can handle different size of message coming to the single input queue.
Can you provide more details? _________________ 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 |
|
 |
javaforvivek |
Posted: Fri Jan 14, 2005 12:34 am Post subject: |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
What do you mean by 'Different Length Messages'??
For e.g.,
Code: |
<EmployeeList>
<Employee code = "001">
<Name>Vivek</Name>
</Employee>
</EmployeeList> |
has different length than
Code: |
<EmployeeList>
<Employee code = "001">
<Name>Vivek</Name>
</Employee>
<Employee code = "002">
<Name>Sudhir</Name>
</Employee>
</EmployeeList> |
Only thing is that <Employee> is repeated multiple times. This can be specified in an xml schema.
Now, as jefflowrey has written, you can either pass the msgset,domain,type,format info through RFH2 header or you can specify them in the MQInput Node of your msg flow.
If you are asking about handling different message structures in a single queue then its a different thing. _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
NewMB |
Posted: Fri Jan 14, 2005 7:08 am Post subject: |
|
|
Apprentice
Joined: 05 Jan 2005 Posts: 42
|
Yes, I apologize for the confusion. I should say "handling different message structure" instead of " different length". The message type is all the same (COBOL copybook) but the structures are different. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jan 14, 2005 7:43 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Again, the MQRFH2 can be used to specify the message structure on a per message basis.
But Broker won't do any automatic routing through your flow based on the message structure.
You will have to code to detect the incoming message structure, and process accordingly.
And you should strongly consider keeping logically distinct messages in different queues. The overhead of mananging additional queues is usually a lot less than the overhead of trying to figure out what happened to a message lost on an inappropriately shared queue. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JT |
Posted: Fri Jan 14, 2005 8:43 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Quote: |
I should say "handling different message structure" instead of " different length". The message type is all the same (COBOL copybook) but the structures are different. |
If you decide to go with using a single queue to handle multiple COBOL formats, another option is to specify a message domain of BLOB on the MQInput node. Then, interrogate the binary string to determine the type of message. Based on that determination, the BLOB can be parsed using the CREATE statement with the PARSE parameter (within a single Compute node) or using the RouteToLabel/Label and ResetContentDescriptor nodes. |
|
Back to top |
|
 |
NewMB |
Posted: Fri Jan 14, 2005 9:55 am Post subject: |
|
|
Apprentice
Joined: 05 Jan 2005 Posts: 42
|
But it will lose the functionality of varifing incoming messages using message definition. |
|
Back to top |
|
 |
kirani |
Posted: Fri Jan 14, 2005 11:48 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
If you are using different record types then you can use "choice" complex types to define your input message.
Can you post your sample layout here? It'd be easier to explain using example. _________________ 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 |
|
 |
EddieA |
Posted: Sat Jan 15, 2005 10:26 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
If you are using different record types then you can use "choice" complex types to define your input message |
Maybe. But:
Quote: |
Does Message broker V.5 handle different length incoming messages |
Then again, maybe not. Choice won't work for different length messages.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
sieijish |
Posted: Sun Jan 16, 2005 3:40 am Post subject: |
|
|
Acolyte
Joined: 29 Nov 2004 Posts: 67 Location: London
|
Quote: |
But it will lose the functionality of varifing incoming messages using message definition. |
No you will not lose the validation functionality. You can specify whether to validate the message or not when BLOB is parsed to MRM tree while using the 'CREATE' statement with 'PARSE' and 'DOMAIN' parameters. |
|
Back to top |
|
 |
|