Author |
Message
|
GeneRK4 |
Posted: Tue Feb 04, 2014 6:47 pm Post subject: Multi parsing of different inputs in same message flow |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
Hi ,
I want to design a flow which can parse different types of input messages(XML,CSV,CPY etc..).There is only one input node which is accepting all the different types of messages.
I am thinking to choose BLOB in the Input node and in the subsequent Compute node planning to use CREATE PARSE esql statement to parse different type of messages.
Is this good idea to achieve multi parsing?Is there any better approach? |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Feb 04, 2014 8:21 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The way you describe it, it's a bad idea. Think about it and come up with a better alternative...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
GeneRK4 |
Posted: Tue Feb 04, 2014 9:47 pm Post subject: |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
We can have multiple Input nodes which will parse the incoming message individually...
I could think of only this as another approach..
Sorry..pls provide your valuable inputs.. |
|
Back to top |
|
 |
dogorsy |
Posted: Tue Feb 04, 2014 10:54 pm Post subject: |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
GeneRK4 wrote: |
We can have multiple Input nodes which will parse the incoming message individually...
I could think of only this as another approach..
Sorry..pls provide your valuable inputs.. |
It seems to me you are using this forum for education. The questions you are asking are pretty basic. So, as you are asking for valuable inputs: Get some formal education, there are courses of all kinds. Talk to your manager or team leader.
Then if you have problems, you can ask. But do not ask people in this forum to do your job for you.
You have 2 different approaches and do not know which one to use. What is preventing you from coding both and see what happens ? That way you will learn a few things. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Feb 05, 2014 1:28 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
More maintainable options would be:
- make the sending application(s) send each type of message to a different queue/port
- construct a routing flow that inspects the incoming message in the BLOB domain and chooses the appropriate format-specific flow.
- use the same routing logic, but use routeToLabel and send the message to the appropriate RCD node. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
McueMart |
Posted: Wed Feb 05, 2014 3:08 am Post subject: |
|
|
 Chevalier
Joined: 29 Nov 2011 Posts: 490 Location: UK...somewhere
|
If you can modify the sending application(s), you can have them add an MQRFH2 header and set the correct message domain/type etc in the MCD folder (Read the infocenter for MQInput node for more info).
This value will override the parser which you have set on the MQInput node.
@kimbert - The above feature, although useful, would be nice if you could 'disable' it via a flag on the MQInput node. e.g. 'Don't allow parser override'. Has this been considered? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Feb 05, 2014 6:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
McueMart wrote: |
@kimbert - The above feature, although useful, would be nice if you could 'disable' it via a flag on the MQInput node. e.g. 'Don't allow parser override'. Has this been considered? |
Raise an RFE and find out.....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
GeneRK4 |
Posted: Wed Feb 05, 2014 6:06 pm Post subject: |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
Thanks for all your valuable inputs.I have got the information I required now.. |
|
Back to top |
|
 |
GeneRK4 |
Posted: Mon Mar 17, 2014 6:55 pm Post subject: |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
fjb_saper wrote: |
The way you describe it, it's a bad idea. Think about it and come up with a better alternative...  |
Hi..Could you please let me know why it is a bad idea?
I have 5 different types of input message.And only File nodes in the Message flow.Hence MQ headers mcd cannot be used for parsing.
I want to reduce the number of nodes used.I dont want to use many RCD nodes for parsing each and every type of input.
Hence,I have a compute node which uses CREASE PARSE statement for parsing each and every type of message.
Please provide your advice on why this is a bad idea...This will help me to redesign my flow with optimal solution. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Mar 18, 2014 1:06 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I want to reduce the number of nodes used. |
Any reason why you want to use one FileInput node instead of five? _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
GeneRK4 |
Posted: Tue Mar 18, 2014 1:28 am Post subject: |
|
|
Master
Joined: 08 Jul 2013 Posts: 220
|
I have found solution to handle multiple files from the same directory ,by a single File node itself.
And,it is good design by reducing the number of nodes.
I want to understand how single compute node which can parse multiple type of messages using CREATE PARSE statement would be bad design... |
|
Back to top |
|
 |
Gralgrathor |
Posted: Tue Mar 18, 2014 3:33 am Post subject: |
|
|
Master
Joined: 23 Jul 2009 Posts: 297
|
GeneRK4 wrote: |
it is good design by reducing the number of nodes |
The quality of a design does not necessarily depend on how many or how few nodes you employ... _________________ A measure of wheat for a penny, and three measures of barley for a penny; and see thou hurt not the oil and the wine. |
|
Back to top |
|
 |
|