Hi This is expected. You cannot have 2 or more CXF routes that uses the same endpoint. from("cxf:bean:hubws?dataFormat=MESSAGE").
Each of these CXF routes must be unique. On Mon, Jul 28, 2014 at 11:37 AM, Frankiboy <mail.to.fra...@gmail.com> wrote: > > I want to have the same message into two routes, but when i add number 2 i > get a error. > > How to ? > > My route: > > > from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching() > .onException(Exception.class).process(new LogError()).end() > .filter().method(LogMq.class, "logStart") > .to("activemq:topic:HUB_TOP01?selector=BD='YES'"); > > > > from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching() > .onException(Exception.class).process(new LogError()).end() > .bean(AddIpBean.class) > .recipientList().method(Util.class, "getEndpoint"); > > My camel.xml > > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:cxf="http://camel.apache.org/schema/cxf" > xsi:schemaLocation="http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans.xsd > http://camel.apache.org/schema/spring > http://camel.apache.org/schema/spring/camel-spring.xsd > http://camel.apache.org/schema/cxf > http://camel.apache.org/schema/cxf/camel-cxf.xsd"> > > <bean id="bankconnectRoutes" > class="dk.bankconnect.hub.controller.CentralRouter" /> > > > <bean id="activemq" > class="org.apache.camel.component.jms.JmsComponent"> > <property name="connectionFactory"> > <bean class="com.ibm.mq.jms.MQConnectionFactory"> > <property name="transportType" value="1"/> > <property name="hostName" > value="bdaix416.bdunet.dk"/> > <property name="port" value="1414"/> > <property name="queueManager" value="HUB_T_416"/> > <property name="channel" value="SYSTEM.DEF.SVRCONN"/> > <property name="CCSID" value="819"></property> > </bean> > </property> > </bean> > > > <cxf:cxfEndpoint id="hubws" address="/CorporateService" > xmlns="http://service.bankconnect.dk" > wsdlURL="WEB-INF/bankconnect.wsdl" > /> > <camelContext xmlns="http://camel.apache.org/schema/spring"> > <routeBuilder ref="bankconnectRoutes" /> > > > </camelContext> > </beans> > > > Exception: > > org.apache.camel.FailedToStartRouteException: Failed to start route route2 > because of Multiple consumers for the same endpoint is not allowed: > Endpoint[cxf://bean:hubws? > dataFormat=MESSAGE] > > Any ideas ? > > Frank > > > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Failed-to-start-route-route2-because-of-Multiple-consumers-for-the-same-endpoint-is-not-allowed-tp5754511.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/