Author |
Message
|
kishoreraju |
Posted: Wed Jan 04, 2006 1:03 pm Post subject: Can we read more then one Msg from queue using MQInput Node |
|
|
Disciple
Joined: 30 Sep 2004 Posts: 156
|
Hi all
I have scenario where i have to read four or five messages from a queue, covert into a single message and covert into into a single message by using Message Broker 5.0.
How can we do this (can we do this by using the property All messages available in advanced tab of MQ Input Node and by grouping all incoming messages |
|
Back to top |
|
 |
EddieA |
Posted: Wed Jan 04, 2006 1:27 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
All messages available in advanced tab of MQ Input Node and by grouping all incoming messages |
No. This still reads the messages one by one, but won't start reading them until all the messages that belong to the group are avaialable.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
kishoreraju |
Posted: Wed Jan 04, 2006 1:57 pm Post subject: |
|
|
Disciple
Joined: 30 Sep 2004 Posts: 156
|
Can u tell what are the headers that we have set in the esql to create a message group from a message flow. |
|
Back to top |
|
 |
recallsunny |
Posted: Wed Jan 04, 2006 2:10 pm Post subject: |
|
|
 Disciple
Joined: 15 Jun 2005 Posts: 163 Location: Massachusetts
|
If I understand your scenario, you are trying to process a set of i/p messages using a message flow...if so then why would you need the Message flow to create a Message group? Check out more about Message segmentation and see if your scenario needs this.
If the 4 or 5 messages you mention are linked logically by a correlId etc, then you should consider using a custom Input node to retrieve all the msgs based on the correlId and delivered to your message flow.
If there is no logical link for these messages and you need to process them based on msg count, define a trigger control on depth and kick start your message flow.... |
|
Back to top |
|
 |
EddieA |
Posted: Wed Jan 04, 2006 2:22 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
You started by asked about reading a group of messages:
Quote: |
I have scenario where i have to read four or five messages from a queue |
now you are asking how to create a group:
Quote: |
Can u tell what are the headers that we have set in the esql to create a message group from a message flow |
What exactly are you trying to do.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
kishoreraju |
Posted: Mon Jan 09, 2006 11:15 am Post subject: |
|
|
Disciple
Joined: 30 Sep 2004 Posts: 156
|
My exeact scenario is:
Read data from a database of size around 100 MB write it to a file. for writing the data on to a file I have to use JText adapter which can only handle up to 35 MB.
The proposed solution for this is .
1) A message flow to read the data from the data base
2) A message flow with JText adapter to write the data on to a file.
( here I am using two message flows to increate the performance)
1.A message flow to read the data from the database.
In this flow it will count the no of records in the database, based on that it will split data into different messages of same group( I don’t know how to set the message group attributes from a message flow).
3) A message flow with JText adapter to write the data on to a file.
In this flow by using the Message Group information it will write each group into a single file. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jan 09, 2006 11:27 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
JText is not the best choice for this.
Message grouping is not the best choice for this.
Rather than go into better choices for queue->file, I will use all of your exact technologies and tell you how to do this just a bit better.
Create one message for each file.
Your flow 1 now creates one output message, that is no more than 35 mg in size. Which your flow 2 can handle.
Do not try to design a solution that is more complicated than it needs to be.
If you were using version 6, you could use a Java compute node to directly write the message to a file. Then you could skip the JText adapter entirely - which would *vastly* simplify your overall design. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kishoreraju |
Posted: Mon Jan 09, 2006 11:32 am Post subject: |
|
|
Disciple
Joined: 30 Sep 2004 Posts: 156
|
The problem that i have to write whole 100 MB data into a single file. how can i do this. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jan 09, 2006 11:37 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
kishoreraju wrote: |
The problem that i have to write whole 100 MB data into a single file. how can i do this. |
You have to figure out how to use JText to append to a file rather than create a new file.
And you have to figure out how to tell the JText flow that one file has ended and a new file has begun.
If you figure out the first one, then you can use Message Grouping to figure out the second one. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kishoreraju |
Posted: Mon Jan 09, 2006 11:52 am Post subject: |
|
|
Disciple
Joined: 30 Sep 2004 Posts: 156
|
We can append a file by using the Jtext connector by setting the property FileWriteMode to "a" in Dynamic child meta object of the Jtext connector.
Can u tell how and where to set the Message group information of a message from a Message Flow. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jan 09, 2006 11:55 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Message group information is set in the MQMD of the message. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|