Author |
Message
|
r4ul90 |
Posted: Thu Jan 03, 2013 7:14 am Post subject: Concurrency in compute node |
|
|
Newbie
Joined: 03 Jan 2013 Posts: 5
|
I'm trying to send an email with data generated by two different flows, each one of them is connected to the same email generating subflow.
The problem is I end up with two different emails each message is incomplete and only contains the information generated by the thread (flow) sending it.
I tried using a shared variable as a lock (on the email generating subflow) but it doesn't help much, since both threads run at the same time.
What would you recommend to solve this issue? What I'm trying to do here, is to send only 1 email containing the data generated by 2 different flows.
Any kind of help would be much appreciated.
Thanks in advance. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jan 03, 2013 7:23 am Post subject: Re: Concurrency in compute node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
r4ul90 wrote: |
What would you recommend to solve this issue? What I'm trying to do here, is to send only 1 email containing the data generated by 2 different flows. |
What you're describing is an aggregation. You can either use the specific fan-in / fan-out nodes to assemble the data into a single email, or use a Collector node to collect it.
Which method is best depends entirely on your circumstances and environment. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
r4ul90 |
Posted: Thu Jan 03, 2013 10:01 am Post subject: |
|
|
Newbie
Joined: 03 Jan 2013 Posts: 5
|
I'm trying to use a Collector node, but I have a doubt how can I enable the message collection to be automatically propagated for processing?
And Vitor thanks a lot for your tip, I'm new using messagebroker and really didn't know how to solve this. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jan 03, 2013 10:15 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
r4ul90 wrote: |
I'm trying to use a Collector node, but I have a doubt how can I enable the message collection to be automatically propagated for processing? |
I have a doubt how you could disable the propagation of a completed collection! _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
r4ul90 |
Posted: Thu Jan 03, 2013 10:32 am Post subject: |
|
|
Newbie
Joined: 03 Jan 2013 Posts: 5
|
Before that I forgot to mention, how to create the collection?
Could you share an example?
I have my collector node receiving from two different inputs, how can I extract the data from there and propagate it to the next node? |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Thu Jan 03, 2013 10:42 am Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
Hi,
Yuo have not mentioned what version of the broker you are using, but I assume version 7. Have you studied what InfoCenter says about Collector node?
--
Marko |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jan 03, 2013 10:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
r4ul90 wrote: |
Before that I forgot to mention, how to create the collection? |
You don't - that's what you're using the node to do.
r4ul90 wrote: |
Could you share an example? |
Doesn't the product come with one?
r4ul90 wrote: |
I have my collector node receiving from two different inputs, how can I extract the data from there and propagate it to the next node? |
Again, you don't, the node does that for you.
I echo the comment of my associate regarding looking at the InfoCenter and add this question:
What happens when you try it? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Jan 03, 2013 11:52 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
A trace node configured to show
[code]
${Root}
[/code]
Connected to both the 'out' and 'timeout' terminals will give you a wealth of information. Why not give it a try and then come back here with your results and we can help you with the next step.
A point to consider is that IMHO the Collector Node is the most tricky Node of all of those available to setup and use properly. Error handling on the downstream side can be particularly difficult. So Whenever I use this node now, I pass the message that contains the collection to an MQOutput Node as quickly as possible.
You need to do a lot of detailed testing to make sure that your solution works not only now but after 100K messages have been processed by it.
I tried the Collector Node and made all sorts of mistakes. You learn my experimenting and from your failures.
[b]Go on, give it a go, you know it makes sense![/b] _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|