camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tarun Kumar <agrawal.taru...@gmail.com>
Subject Dynamic Route in camel
Date Thu, 23 May 2013 10:26:12 GMT
1. In my routes, output exchange of first endpoint gives me one id that i
use in .to() to form endpoint url. So, basically my .to() url will look
like:

abc.com/cid

This cid i get from out exchange of first endpoint. How can i set that?

2. in camel dynamic router, i saw :


from("direct:start")
    // use a bean as the dynamic router
.dynamicRouter(method(DynamicRouterTest.class, "slip"));

public String slip(String body) {
    bodies.add(body);
    invoked++;

    if (invoked == 1) {
        return "mock:a";
    } else if (invoked == 2) {
        return "mock:b,mock:c";
    } else if (invoked == 3) {
        return "direct:foo";
    } else if (invoked == 4) {
        return "mock:result";
    }

    // no more so return null    return null;
}


But, here my question is : who will set body (method parameter) in slip method?


Thanks,

Tarun

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