java - How to pass exchange ID and originating route ID to a bean? -



java - How to pass exchange ID and originating route ID to a bean? -

exchange interface has getexchangeid() method returns id of exchange. there way pass value method of bean when calling bean route?

the same question id of route originated exchange. value returned getfromrouteid() method of exchange interface.

i know pass exchange object bean entirely. it's undesirable bind bean camel api in case.

you can utilize @simple annotation bean parameter binding

public void foo(@simple("exchangeid") string id, @simple("routeid") string routeid, object body) { ... }

some links

http://camel.apache.org/simple http://camel.apache.org/parameter-binding-annotations.html

java apache-camel

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -