camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Keller (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-7986) Route disappears if named "route1"
Date Fri, 31 Oct 2014 14:26:35 GMT
Peter Keller created CAMEL-7986:
-----------------------------------

             Summary: Route disappears if named "route1"
                 Key: CAMEL-7986
                 URL: https://issues.apache.org/jira/browse/CAMEL-7986
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.14.0
            Reporter: Peter Keller


With below route configuration with {{routeId}} defined as {{route1}}, {{route2}} and intentionally
omitted {{routeId}} for the 3rd route, Camel will auto-generate a {{routeId}} with format
as {{route}} + count for you if you didn't define it. This seems to cause some routes to be
missed.

Route definitions:
{code}
 from("direct:start1")
     .routeId("route1")
     .log("route1: ${body}");

 from("direct:start2")
      .routeId("route2")
      .log("route2: ${body}");

 from("direct:start3") // no route id!
      .log("route3: ${body}");
{code}

Testing:
{code}
 ProducerTemplate template = context.createProducerTemplate();
 template.sendBody("direct:start1", "World!");
 template.sendBody("direct:start2", "World!");
{code}

This leads to following exception:
{quote}
    Caused by: org.apache.camel.component.direct.DirectConsumerNotAvailableException: No consumers
available on endpoint: Endpoint[direct://start1]
{quote}

If the {{direct:start3}} route is deleted or {{direct:start}} is renamed, then everything
works as expected. 

See http://stackoverflow.com/questions/26646881/route-is-not-detected-when-route-id-is-not-assigned-does-camelcontext-loses-the/26673144#26673144



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message