Hi, I have a sample system with 3 components that each has an outgoing queue and I route based on the message type in the header (see camel-context.xml below). So, I have ComponentA_outgoing, ComponentB_outgoing & ComponentC_outgoing going to a bunch of incoming queues.
If I start up all 3 components, each sending 2 test messages, a String & a Date. It will work about 50% of the time. The other 50%, the admin panel shows a consumer on one or more of the %_outgoing queue, but with pending messages that never get routed. It appears the system just stops routing messages. There are no other queues with objects, so its not waiting for another queue and I have persistent=false, so I am not waiting for data storage. If I add a while statement to the end of each components test function, basically sending another string every 5 seconds, all messages go through. What am I missing? Below is my context file. Thanks for your help. --- camel-context.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> <jmxAgent id="agent" createConnector="true"/> <route> <from uri="activemq:queue:ComponentA_outgoing" /> <choice> <when> <simple>${header.original} == 'java.lang.String'</simple> <to uri="activemq:queue:ComponentB_incoming" /> </when> <when> <simple>${header.original} == 'java.util.Date'</simple> <to uri="activemq:queue:ComponentC_incoming" /> </when> <otherwise> <to uri="activemq:queue:InvalidDatatypeQueue" /> </otherwise> </choice> </route> <route> <from uri="activemq:queue:ComponentB_outgoing" /> <choice> <when> <simple>${header.original} == 'java.lang.String'</simple> <to uri="activemq:queue:ComponentC_incoming" /> </when> <when> <simple>${header.original} == 'java.util.Date'</simple> <to uri="activemq:queue:ComponentA_incoming" /> </when> <otherwise> <to uri="activemq:queue:InvalidDatatypeQueue" /> </otherwise> </choice> </route> <route> <from uri="activemq:queue:ComponentC_outgoing" /> <choice> <when> <simple>${header.original} == 'java.lang.String'</simple> <to uri="activemq:queue:ComponentA_incoming" /> </when> <when> <simple>${header.original} == 'java.util.Date'</simple> <to uri="activemq:queue:ComponentB_incoming" /> </when> <otherwise> <to uri="activemq:queue:InvalidDatatypeQueue" /> </otherwise> </choice> </route> </camelContext> <bean id="jms" class="org.apache.camel.component.jms.JmsComponent"> <property name="connectionFactory"> <bean class="org.apache.activemq.ActiveMQConnectionFactory"> <property name="brokerURL" value="vm://localhost?broker.persistent=false&broker.useJmx=false"/> </bean> </property> </bean> </beans> -- View this message in context: http://camel.465427.n5.nabble.com/Needing-to-push-objects-out-for-some-reason-tp4393878p4393878.html Sent from the Camel - Users mailing list archive at Nabble.com.
