camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cohen, Bruce" <>
Subject context component with seda options
Date Fri, 21 Feb 2014 14:24:14 GMT
I'm trying to use the context component with SEDA endpoints.  My goal is to be able to define
a SEDA endpoint in one context and have multiple consumers in other contexts consuming from
it, is this possible?

 I have the following two Spring DSL XML configurations:


<camelContext id="inner">
     <endpoint id="inner-in" uri="seda:shared?multipleConsumers=true"/>

             <from uri="direct:in"/>
             <!-- do good stuff here -->
             <to ref="inner-in"/>


<camelContext id="outer" depends-on="inner">
            <from uri="context:inner:shared?multipleConsumers=true"/>
            <!-- do other good stuff here -->
            <to uri="direct:out"/>

This results in an exception being thrown that reads:

org.apache.camel.ResolvedEndpointFailedException: Failed to resolve the endpoint: Cannot find
the endpoint with the uri shared in the CamelContext inner

If I modify both contexts to remove '?multipleConsumers=true' from both references to the
'shared' endpoint I'm able to resolve the 'shared' endpoint in the outer context with no exceptions
(but since multipleConsumers isn't set to 'true' on the endpoint I won't be able to accomplish
my goal)

If I remove '?multipleConsumers=true' from just the endpoint definition in inner.xml I get
a different exception:

java.lang.IllegalArgumentException: Cannot use existing queue seda://shared as the existing
queue multiple consumers false does not match the given multiple consumers true

How can I define a SEDA endpoint in one context so that multiple consumers in other contexts
can consume from it?

Thanks in advance,

View raw message