camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frankiboy <mail.to.fra...@gmail.com>
Subject Failed to start route route2 because of Multiple consumers for the same endpoint is not allowed
Date Mon, 28 Jul 2014 09:37:40 GMT

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.

Mime
View raw message