You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Ivan Koblik (JIRA)" <ji...@apache.org> on 2013/05/17 09:37:16 UTC
[jira] [Created] (CAMEL-6373) Removing route stops other routes
from the same producer
Ivan Koblik created CAMEL-6373:
----------------------------------
Summary: Removing route stops other routes from the same producer
Key: CAMEL-6373
URL: https://issues.apache.org/jira/browse/CAMEL-6373
Project: Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 2.11.0
Reporter: Ivan Koblik
If there are 2 routes from the same source, e.g.:
{code}
CamelContext camelContext = new DefaultCamelContext();
final PrinterBean bean1 = new PrinterBean("bean1");
final PrinterBean bean2 = new PrinterBean("bean2");
RouteBuilder builder = new RouteBuilder(camelContext) {
@Override
public void configure() throws Exception {
from("vm:producer?multipleConsumers=true").routeId("route1").bean(bean1);
}
};
RouteBuilder builder2 = new RouteBuilder(camelContext) {
@Override
public void configure() throws Exception {
from("vm:producer?multipleConsumers=true").routeId("route2").bean(bean2);
}
};
camelContext.addRoutes(builder);
camelContext.addRoutes(builder2);
{code}
And if after starting the context {{camelContext.start();}} I stop and remove one of the routes the other one will stop working as well.
{code}
camelContext.stopRoute("route2");
camelContext.removeRoute("route2");
{code}
These messages will not be delivered to bean1:
{code}
System.out.println("Sending message");
ProducerTemplate producerTemplate = camelContext.createProducerTemplate();
for (int i = 0; i < 100; i++) {
producerTemplate.sendBody("vm:producer?multipleConsumers=true", i);
}
{code}
----
When debugging I noticed that in {{SedaEndpoint}} on line 144 it stops shared MulticastProcessor used by the both routes.
Please see this post to get the entire source file:
http://camel.465427.n5.nabble.com/Removing-route-stops-other-routes-from-the-same-producer-td5732616.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira