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:
inner.xml
<camelContext id="inner">
<endpoint id="inner-in" uri="seda:shared?multipleConsumers=true"/>
<route>
<from uri="direct:in"/>
<!-- do good stuff here -->
<to ref="inner-in"/>
</route>
</camelContext>
outer.xml
<camelContext id="outer" depends-on="inner">
<route>
<from uri="context:inner:shared?multipleConsumers=true"/>
<!-- do other good stuff here -->
<to uri="direct:out"/>
</route>
</camelContext>
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,
Bruce