Author |
Message
|
wbintegrator |
Posted: Thu May 18, 2006 3:40 am Post subject: JavaCompute Node and MQ |
|
|
Voyager
Joined: 08 Feb 2006 Posts: 83
|
HI everyone,
I have a flow that uses several MQGet nodes and puts the obtained messages into the Environment. Another Flow is triggered after that, which merges those messages.
Just wanted to ask if it's possible to perform MQ commands from the javaCompute Node. Performing several MQGets in code should be faster and more efficient, I think.
Has anyone tried to do something similiar?
thank you. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 18, 2006 4:04 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It really sounds like you want to use aggregation instead.
I'm also confused by how you are moving Environment data from one FLOW to another, as there's no way to do this natively in WMB v6. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wbintegrator |
Posted: Thu May 18, 2006 4:21 am Post subject: |
|
|
Voyager
Joined: 08 Feb 2006 Posts: 83
|
Quote: |
It really sounds like you want to use aggregation instead. |
Thanks for the tip, I'll check out how agragation works, we have never used it before.
As for the environment, you're absolutely right. The flow I talked about has been designed but not deployed yet. I would certainly come across that fact later, so thanks for saving my time.
Anyway, back to the JavaCompute, is it possible to use MQ commands from there?
Thanks again, jefflowrey. |
|
Back to top |
|
 |
vennela |
Posted: Thu May 18, 2006 7:00 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Quote: |
Anyway, back to the JavaCompute, is it possible to use MQ commands from there? |
Maybe, but what are you really trying to do is the question. |
|
Back to top |
|
 |
wbintegrator |
Posted: Sun Jun 04, 2006 11:34 pm Post subject: |
|
|
Voyager
Joined: 08 Feb 2006 Posts: 83
|
I want to get messages from a queue in a loop, and later I might also consider putting messages in a loop. |
|
Back to top |
|
 |
wbintegrator |
Posted: Mon Jun 05, 2006 12:21 am Post subject: |
|
|
Voyager
Joined: 08 Feb 2006 Posts: 83
|
Just in case anyone is interested in the issue, u CAN put/get messages form JavaCompute node, actually do almost anything. |
|
Back to top |
|
 |
wschutz |
Posted: Mon Jun 05, 2006 1:28 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
I would think that while you can do your own MQ inside a JCN, you'd have to establish your own connection to the qmgr, which means that your units-of-work aren't co-ordinated with the broker's. _________________ -wayne |
|
Back to top |
|
 |
vennela |
Posted: Mon Jun 05, 2006 5:46 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Isn't putting messages using propagate a better way of doing this?
I have done something similar to this using JCN using propagate in a while loop. |
|
Back to top |
|
 |
madi |
Posted: Mon Jun 05, 2006 7:41 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
so does this mean it is possible to get more than one message from a queue using MQGet node??
--madi |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jun 05, 2006 7:45 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
madi wrote: |
so does this mean it is possible to get more than one message from a queue using MQGet node?? |
Depends on what you mean by "possible". Yes, it is possible.
But you have to put the node in a flow loop to do so.
So, for example, you have to connect the out terminal of the MQGet node (or some downstream out terminal) back to the in terminal of the MQGet node (or some upstream in terminal). _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
madi |
Posted: Mon Jun 05, 2006 7:59 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
yeah, that is what i had in mind (mqget in a loop)
which is better ...... doing this in a loop or just doing multiple mqgets in a java compute node??
also can this be done in an aggregation node ....... i have never used this node before
--madi |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jun 05, 2006 8:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Which is better? It depends.
You can't directly configure Aggregation to read multiple messages from a queue.
You can wire MQGet in a loop, and have each message produced from that MQGet sent off as a request to a process that merely replies with the full request, and use aggregation to assemble those messags into one unit.
But this is very complicated, and uses a lot of queue puts and gets. So I'm not entirely sure it makes sense. It might, in some cases.
You can, however, wire the MQGet in a loop and have a compute node after the Get that makes sure that the MQGet node doesn't overwrite the output of the last run. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wbintegrator |
Posted: Tue Jun 06, 2006 2:38 am Post subject: |
|
|
Voyager
Joined: 08 Feb 2006 Posts: 83
|
Talking about aggregation... Is there a possibility to use timeout in aggreagation, say tell it somehow to wait x secs, and merge whatever has been returned in that time as a final reply? |
|
Back to top |
|
 |
jbanoop |
Posted: Tue Jun 06, 2006 4:07 am Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
aggregation works on the priciple of fan-out/fan-in. The behaviour of aggregate functionality is that it waits for a specified period (set on the aggr reply node) or until all the fanned out threads come back (which ever is earlier). If not all the fanned out paths return, it timesout and comes out on the timeout terminal.
Regards,
Anoop |
|
Back to top |
|
 |
wschutz |
Posted: Tue Jun 06, 2006 6:10 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
|
Back to top |
|
 |
|