camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Taariq Levack <taar...@gmail.com>
Subject Re: How to call a route, wait to finish, and ignore any changes when this returns?
Date Tue, 10 Jan 2017 17:28:08 GMT
In that scenario you might consider multicasting to a route that processes
the deletes in order, as well as to the next/result route.
Just don't process in parallel in that case.

Also, I wouldn't suggest the enricher for each delete like in your example,
perhaps rather route to something that splits and aggregates and then you
might enrich your original exchange with the aggregated result, or
disregard as you did just now.


On 10 Jan 2017 10:15, "sim085" <sim085@hotmail.com> wrote:

However thinking out loud ... is this the right way to do it? This is
actually the opposite of message enriching.

It works, I just wonder if it is the right approach.

For example imagine a scenario where you have a CSV file which has a list of
users that have to be deleted from a system. You load the CSV file, loop
through each line and then have to call a route "seda:deleteuser" but want
to keep the original message when this returns. You want to do this
synchronous so everything is in order in the logs (so one user after the
other). The route "seda:deleteuser" does not enrich the message, it actually
does an action on a system (delete a user).

So is it correct to call this route with enrich()?


sim085 wrote
> thanks for pointing this out. This worked fine.





--
View this message in context: http://camel.465427.n5.nabble.
com/How-to-call-a-route-wait-to-finish-and-ignore-any-change
s-when-this-returns-tp5792288p5792341.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message