Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Failed to start route route2 because of Multiple consumers for the same endpoint is not allowed

$
0
0
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

Viewing all articles
Browse latest Browse all 5648

Trending Articles