Sergey Zhemzhitsky created CAMEL-5489:
-----------------------------------------

             Summary: Support for selection of direct-vm consumers
                 Key: CAMEL-5489
                 URL: https://issues.apache.org/jira/browse/CAMEL-5489
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 2.10.0
            Reporter: Sergey Zhemzhitsky


It may be useful to support ant-like path expression when sending exchanges
to multiple direct-vm consumers.

{code}
protected RouteBuilder createRouteBuilder() throws Exception {
    return new RouteBuilder() {
        @Override
        public void configure() throws Exception {
            from("direct:start")
                .recipientList(new 
DirectVmConsumerExpression("direct-vm://parent/**/context*"));
        }
    };
}

private RouteBuilder createRouteBuilderCamelContext2() {
    return new RouteBuilder() {
        @Override
        public void configure() throws Exception {
            from("direct-vm:parent/child/context2")
                .to("mock:result2");
        }
    };
}

private RouteBuilder createRouteBuilderCamelContext3() {
    return new RouteBuilder() {
        @Override
        public void configure() throws Exception {
            from("direct-vm:parent/child/grandchild/context3")
                .to("mock:result3");
        }
    };
}
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to