camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Segal <>
Subject Adding properties to an Exchange
Date Thu, 14 Jul 2011 17:41:09 GMT
I'd like to know the best way to add domain-specific context information to
Exchanges linked to a particular RouteBuilder. Let's say that I have the

public class MyRouteBuilder extends RouteBuilder {

    String someProperty;

    public void configure() throws Exception {


public class MyBean {
 public void handle(Exchange exchange) {
// Want to access 'someProperty' of MyRouteBuilder here

One way that I believe would work here would be to add a Processor to the
Route which called exchange.setProperty(), then access it in MyBean via
exchange.getProperty(). However, I'm curious if there is an easier/more
preferred way of doing this.


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