You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jtoepfer <jo...@gmail.com> on 2015/12/04 14:19:29 UTC

Multicast to Aggregation not working

I'm running:
Apache ActiveMQ 5.9.1 
Apache Camel 2.15.  

I've have a timer that kicks off a stored proc, which receives a unique
batch id.  That batch id is then passed through a multicast to several
processes.  After all those processes are finished they aggregate back to
file aggregation, which zips up the files and ftp's them out.  

Seemed straight forward when I started.  

Background on each of the processes: Each process calls out via sql
component that then marshals the data into csv.  In commenting out several
pieces of the multicast, I found that one of the sql statements brings back
an empty result set (which could happen).  That empty result set seems to
stop the entire process.

There is no error from what I can tell, and I've got debugging turned up to
trace for just about everything.

Any advise would be helpful.  Thanks.



-----
Josh Toepfer
--
View this message in context: http://camel.465427.n5.nabble.com/Multicast-to-Aggregation-not-working-tp5774676.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Having issues with Multicast to Aggregation ...

Posted by jtoepfer <jo...@gmail.com>.
So I've tried a couple things, include adding a timeout, but that did not
seem to work.  Anyone have any other suggestions?  



-----
Josh Toepfer
--
View this message in context: http://camel.465427.n5.nabble.com/Having-issues-with-Multicast-to-Aggregation-tp5774688p5774823.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Having issues with Multicast to Aggregation ...

Posted by jtoepfer <jo...@gmail.com>.
Sorry for the long delay, I got pulled onto another problem and am just
getting back to this issue.

@Jakub,

  The problem I'm encountering is upon aggregation, the file aggregation
either times out or is stuck in a wait pattern until all multiplex routes
have completed.  I can see in the logs where several of the routes complete,
but a single route just hangs.  Trying to perform a shutdown of ActiveMQ I
get the message waiting for shutdown for 300 seconds.  I'm assuming the this
is due to my route waiting for a response.  

I ended up going the brute force method of calling all the SQL components in
one route, and a route to zip up the generated files.  I was hoping to take
advantage the power of camel, but wasn't in the cards for this time around. 
Another issue arose, was that upgrading camel versions in our environment
meant for more regression testing.  Something I couldn't get buy-in from the
users.



-----
Josh Toepfer
--
View this message in context: http://camel.465427.n5.nabble.com/Having-issues-with-Multicast-to-Aggregation-tp5774688p5775194.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Having issues with Multicast to Aggregation ...

Posted by Jakub Korab <ja...@ameliant.com>.
Can you post up your code? It's hard to tell from the limited 
information that you have provided.

Jakub

On 11/12/15 13:43, jtoepfer wrote:
> I'm not sure if this is the same problem, but it only works once.  The
> second time the process is kicked off the zip aggregation never finishes.
> The system logs the same messages, but the process never finishes.  Any
> thoughts?


Re: Having issues with Multicast to Aggregation ...

Posted by jtoepfer <jo...@gmail.com>.
Ok.  I found where to add the routeEmptyResultSet, which since i'm using
injected SQL I had to append it to the sql in the properties file.

select * from dual?consumer.routeEmptyResultSet=true

but this does not work

<to uri="sql:{{my.foo1.sql}}?consumer.routeEmptyResultSet=true"/>

This fixed my problem of the zip aggregation working.  

I'm not sure if this is the same problem, but it only works once.  The
second time the process is kicked off the zip aggregation never finishes. 
The system logs the same messages, but the process never finishes.  Any
thoughts?



-----
Josh Toepfer
--
View this message in context: http://camel.465427.n5.nabble.com/Having-issues-with-Multicast-to-Aggregation-tp5774688p5774998.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Having issues with Multicast to Aggregation ...

Posted by Claus Ibsen <cl...@gmail.com>.
You can check unit tests they often test the various options.

On Wed, Dec 9, 2015 at 2:17 PM, jtoepfer <jo...@gmail.com> wrote:
> So after digging into the documentation for the last 2 days. There is a
> parameter called routeEmptyResultSet, and it's set to false.  This could be
> the problem, but I'm not aware to set this?  Looking at the code doesn't
> seem really obvious.  Some direction would be helpful if i'm on the right
> track.
>
>
>
> -----
> Josh Toepfer
> --
> View this message in context: http://camel.465427.n5.nabble.com/Having-issues-with-Multicast-to-Aggregation-tp5774688p5774860.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: Having issues with Multicast to Aggregation ...

Posted by jtoepfer <jo...@gmail.com>.
So after digging into the documentation for the last 2 days. There is a
parameter called routeEmptyResultSet, and it's set to false.  This could be
the problem, but I'm not aware to set this?  Looking at the code doesn't
seem really obvious.  Some direction would be helpful if i'm on the right
track.



-----
Josh Toepfer
--
View this message in context: http://camel.465427.n5.nabble.com/Having-issues-with-Multicast-to-Aggregation-tp5774688p5774860.html
Sent from the Camel - Users mailing list archive at Nabble.com.