camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sim085 <>
Subject Re: How to call a route, wait to finish, and ignore any changes when this returns?
Date Mon, 09 Jan 2017 22:12:24 GMT
Hi taariq,

thanks for pointing this out. This worked fine.

		class KeepOriginalAggregationStrategy implements AggregationStrategy {
		    public Exchange aggregate(Exchange original, Exchange resource) {
		        return original;
			.log("Hello From A")
			.setHeader("MyHeader", constant("A-HEADER"))
			.enrich("seda:B", new KeepOriginalAggregationStrategy())
			.log("MyHeader is ${in.header.MyHeader}")
			.log("Body is ${body}")
			.log("Hello From B")
			.log("MyHeader value frm B is : '${in.header.MyHeader}'")
			.setHeader("MyHeader", constant("B-HEADER"))
			.log("Ready from B")


[(camel-1) thread #0 - seda://A] route2                         INFO  Hello
>From A
[(camel-1) thread #1 - seda://B] route3                         INFO  Hello
>From B
[(camel-1) thread #1 - seda://B] route3                         INFO 
MyHeader value frm B is : 'A-HEADER'
[(camel-1) thread #1 - seda://B] route3                         INFO  Ready
from B
[(camel-1) thread #0 - seda://A] route2                         INFO 
MyHeader is A-HEADER
[(camel-1) thread #0 - seda://A] route2                         INFO  Body

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message