Author |
Message
|
kwthomas |
Posted: Thu Jun 28, 2001 6:10 am Post subject: |
|
|
Newbie
Joined: 27 Jun 2001 Posts: 1
|
I am in need of a MQSI node that can produce many messages out from a single message in. For example, I need to be able SQL SELECT rows from a database and have it generate 1 message per row from the array it creates.
Please contact me if you have or know of such a node. |
|
Back to top |
|
 |
Cliff |
Posted: Fri Jun 29, 2001 5:22 am Post subject: |
|
|
Centurion
Joined: 27 Jun 2001 Posts: 145 Location: Wiltshire
|
You could do this in a compute node, creating a DestinationList entry for each returned row, and let a single MQOutput node handle the multiple messages out. Don't forget to check the box in Advanced (in the Compute node) to 'Message and DestinationList' and to configure the MQOutput node appropriately!
Have fun,
Cliff |
|
Back to top |
|
 |
kolban |
Posted: Sat Jun 30, 2001 7:59 pm Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
It sounds like you need to employ a loop. Select the rows from the database that you want and pass those into a filter node. Have the filter node count the number of rows ... if 1, pass to output if > 1 then loop back to the compute node, shrink the list and go back through the same filter. This employs the concept of recursion to continually output one message and shrink the list of messages to go out by one each iteration. |
|
Back to top |
|
 |
Mike Brady |
Posted: Thu Jul 05, 2001 7:34 pm Post subject: |
|
|
Newbie
Joined: 04 Jul 2001 Posts: 8
|
You should be aware that iterating in this manner will cause a new internal copy of the message to be created for each loop. Generally this is not a problem for a small number of iterations, but in your case, should you be processing a large table, you may find you eventually go short on memory.
[ This Message was edited by: Mike Brady on 2001-07-05 20:35 ] |
|
Back to top |
|
 |
chrisfra |
Posted: Mon Apr 01, 2002 6:20 am Post subject: |
|
|
Novice
Joined: 24 Jun 2001 Posts: 14
|
If you are using WMQI V2.1, I think you'll find the new eSQL "PROPAGATE" function will enable you to do what you want to do from a Compute node. |
|
Back to top |
|
 |
Rocket |
Posted: Wed Apr 24, 2002 8:46 pm Post subject: |
|
|
Newbie
Joined: 23 Apr 2002 Posts: 5
|
Kolban, do you have any thoughts on the last post? I'm interested in same. thanks. |
|
Back to top |
|
 |
greenears |
Posted: Wed Jun 12, 2002 9:57 am Post subject: |
|
|
Newbie
Joined: 12 Jun 2002 Posts: 6
|
Instead of using PROPOGATE method, how about this:
Split the message flow into 2 message flows. The first message flow will retrieve the rows from database and put it in a local queue Q1.
The second message flow will pick these rows and using compute node, extract one row and put the rest of the rows back into the local queue Q1.
Please let me know if this will work! |
|
Back to top |
|
 |
dhaksr |
Posted: Wed Jun 12, 2002 2:41 pm Post subject: |
|
|
Apprentice
Joined: 20 Feb 2002 Posts: 37
|
You may like to refer to an earlier thread
http://www.webmq.com/phpBB2/viewtopic.php?t=1580&highlight=memory
We had similar problems and we had to adopt an approach similar to
what greenears have proposed.
In our original design, we had a Single input message triggering a database fetch and producing multiple messages as output.
In our second design, The single message would generate messages
which would give range keys for the database. Another flow would
now pick small subsets of rows and write into output queue.
As Chrisfra had suggested, PROPOGATE is the solution we are using now
after we recently migrated to WMQI 2.1 |
|
Back to top |
|
 |
kirani |
Posted: Fri Jun 14, 2002 4:52 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Well, as Dhaks said in above post, you can generate range of keys for db select. By doing this you will have the control over how many records to select from db. _________________ 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 |
|
 |
|