camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Ulanov <dula...@gmail.com>
Subject Re: Can't get simple test to work
Date Sat, 05 Sep 2009 06:54:36 GMT
You have to setting a consumer endpoint:

<camelContext id="camel"
xmlns="http://camel.apache.org/schema/spring">
   <route>
     <from uri="direct:testing"/>
     <to uri="log:com.example?level=INFO"/>
   </route>
 </camelContext>

http://camel.apache.org/log.html

On Sat, Sep 5, 2009 at 6:18 AM, Chris Audley <chris.audley@beacon-cs.com>wrote:

> I'm trying to setup a simple test route so I can start testing some
> Processors I've written.
>
> In spring, I create a very simple context
>
>  <camelContext id="camel"
> xmlns="http://camel.apache.org/schema/spring">
>    <route>
>      <from uri="direct:testing"/>
>    </route>
>  </camelContext>
>
> I inject this context into another bean and later that bean runs some
> code to send a message to the route
>
>        ProducerTemplate template =
> camelContext.createProducerTemplate();
>        tempate.sendBody("direct:testing", "testing");
>
> When I run the sendBody line, I get this message in the log
>
> Sep 4, 2009 10:11:56 PM org.apache.camel.component.direct.DirectProducer
> process
> WARNING: No consumers available on endpoint: Endpoint[direct://testing]
> to process: Exchange[Message: [B@de8aa5]
>
> I'm using Camel 2.0.0 with Spring 2.5.6.  I resorted to this test setup
> because I wasn't getting anywhere with uri="file:..." based routes.
> What the hell am I missing?  I can't believe something this simple
> doesn't work.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message