The answer is Yes.
When the camel context is starting, it will load the route and register the consumer to direct:order. When you use the template to send the message to direct:order, camel direct endpoint will check if the consumer is activated.

On 2/20/12 11:17 PM, Samruben wrote:
yes,
  its in my camel.xml.

camel.xml
----------

<beans xmlns="http://www.springframework.org/schema/beans";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
        http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
     ">
<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
     <property name="connectionFactory">
       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
         <property name="brokerURL" value="tcp://localhost:61616" />
       </bean>
     </property>
   </bean>

     <camelContext id="camel" trace="true"
xmlns="http://camel.apache.org/schema/spring";>

         <dataFormats>
             <jaxb id="jaxb" contextPath="camelinaction"/>
         </dataFormats>

         <route>
             <from uri="direct:order"/>
             <marshal ref="jaxb"/>
             <to uri="jms:queue:test.queue"/>
         </route>

           </camelContext>

-------------------------------------

direct:order works only when the router is present?

--
View this message in context: 
http://camel.465427.n5.nabble.com/error-while-using-direct-order-tp5498624p5499359.html
Sent from the Camel - Users mailing list archive at Nabble.com.



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Reply via email to