You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Kobe <kb...@gmail.com> on 2011/05/20 07:47:10 UTC
Simple route with JMS queue is not working
I am trying to compose a route by connecting them via a jms queue.
The route does not work. messages emitted by the srcText are not
capture in the destination at all ("data.txt").
can you tell if thre is a mistake in this? I use Camel 2.7.1.
<camel:camelContext id="camelContext">
<camel:route>
<camel:from uri="bean:srcText" />
<camel:to uri="jms:queue:order" />
</camel:route>
<camel:route>
<camel:from uri="jms:queue:order" />
<camel:pipeline>
<camel:transform>
<camel:simple>Hello ${body} how are you?</camel:simple>
</camel:transform>
<camel:to uri="file:/tmp/data/outbox?fileName=data.txt" />
</camel:pipeline>
</camel:route>
</camel:camelContext>
thanking you
Kobe
--
View this message in context: http://camel.465427.n5.nabble.com/Simple-route-with-JMS-queue-is-not-working-tp4411810p4411810.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Simple route with JMS queue is not working
Posted by fradj zayen <za...@gmail.com>.
If you want to fire a message automatically then used a timer, otherwise
create a junit test that load camel context and send message to your start
endpoint. to have more details in Camel Testing, please visit this link
http://camel.apache.org/testing.html
2011/5/21 Tim <ch...@gmail.com>
> Direct routes do not automatically fire. I suggest that you use a timer if
> you want it to start automatically or a proxy to the direct
> On May 20, 2011 2:56 PM, "Kobe" <kb...@gmail.com> wrote:
> > thank for your help. I begin the route with "direct:start" and add the
> bean
> > as the
> > second step as below. I still not get any output; target file
> > /tmp/data/outbox/data.txt
> > is not created.
> >
> > how I can debug this problem? I notice with debugger that bean
> > srcText::sayTest
> > is not even called.
> >
> >
> > <camel:camelContext id="camelContext">
> > <camel:route>
> > <camel:from uri="direct:start" />
> > <camel:bean ref="srcText" method="sayTest"/>
> > <camel:to uri="jms:queue:order" />
> > </camel:route>
> > <camel:route>
> > <camel:from uri="jms:queue:order" />
> > <camel:pipeline>
> > <camel:transform>
> > <camel:simple>Hello ${body} how are you?</camel:simple>
> > </camel:transform>
> > <camel:to uri="file:/tmp/data/outbox?fileName=data.txt" />
> > </camel:pipeline>
> > </camel:route>
> >
> >
> > thank
> >
> > --
> > View this message in context:
>
> http://camel.465427.n5.nabble.com/Simple-route-with-JMS-queue-is-not-working-tp4411810p4413428.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
Re: Simple route with JMS queue is not working
Posted by Tim <ch...@gmail.com>.
Direct routes do not automatically fire. I suggest that you use a timer if
you want it to start automatically or a proxy to the direct
On May 20, 2011 2:56 PM, "Kobe" <kb...@gmail.com> wrote:
> thank for your help. I begin the route with "direct:start" and add the
bean
> as the
> second step as below. I still not get any output; target file
> /tmp/data/outbox/data.txt
> is not created.
>
> how I can debug this problem? I notice with debugger that bean
> srcText::sayTest
> is not even called.
>
>
> <camel:camelContext id="camelContext">
> <camel:route>
> <camel:from uri="direct:start" />
> <camel:bean ref="srcText" method="sayTest"/>
> <camel:to uri="jms:queue:order" />
> </camel:route>
> <camel:route>
> <camel:from uri="jms:queue:order" />
> <camel:pipeline>
> <camel:transform>
> <camel:simple>Hello ${body} how are you?</camel:simple>
> </camel:transform>
> <camel:to uri="file:/tmp/data/outbox?fileName=data.txt" />
> </camel:pipeline>
> </camel:route>
>
>
> thank
>
> --
> View this message in context:
http://camel.465427.n5.nabble.com/Simple-route-with-JMS-queue-is-not-working-tp4411810p4413428.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Simple route with JMS queue is not working
Posted by Kobe <kb...@gmail.com>.
thank for your help. I begin the route with "direct:start" and add the bean
as the
second step as below. I still not get any output; target file
/tmp/data/outbox/data.txt
is not created.
how I can debug this problem? I notice with debugger that bean
srcText::sayTest
is not even called.
<camel:camelContext id="camelContext">
<camel:route>
<camel:from uri="direct:start" />
<camel:bean ref="srcText" method="sayTest"/>
<camel:to uri="jms:queue:order" />
</camel:route>
<camel:route>
<camel:from uri="jms:queue:order" />
<camel:pipeline>
<camel:transform>
<camel:simple>Hello ${body} how are you?</camel:simple>
</camel:transform>
<camel:to uri="file:/tmp/data/outbox?fileName=data.txt" />
</camel:pipeline>
</camel:route>
thank
--
View this message in context: http://camel.465427.n5.nabble.com/Simple-route-with-JMS-queue-is-not-working-tp4411810p4413428.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Simple route with JMS queue is not working
Posted by fradj zayen <za...@gmail.com>.
Hi Kobe,
as it was said, "A bean: endpoint cannot be defined as the input to the
route"
try to use the direct component instead.
<camel:camelContext id="camelContext">
<camel:route>
<camel:from uri="direct:srcText" />
....
2011/5/20 tobeand <to...@gmail.com>
> "A bean: endpoint cannot be defined as the input to the route; i.e.
> you cannot consume from it, you can only route from some inbound
> message Endpoint to the bean endpoint as output."
>
> extracted from Bean Component (http://camel.apache.org/bean.html)
>
>
> On Fri, May 20, 2011 at 1:47 PM, Kobe <kb...@gmail.com> wrote:
> > I am trying to compose a route by connecting them via a jms queue.
> > The route does not work. messages emitted by the srcText are not
> > capture in the destination at all ("data.txt").
> >
> > can you tell if thre is a mistake in this? I use Camel 2.7.1.
> >
> >
> > <camel:camelContext id="camelContext">
> > <camel:route>
> > <camel:from uri="bean:srcText" />
> > <camel:to uri="jms:queue:order" />
> > </camel:route>
> > <camel:route>
> > <camel:from uri="jms:queue:order" />
> > <camel:pipeline>
> > <camel:transform>
> > <camel:simple>Hello ${body} how
> are you?</camel:simple>
> > </camel:transform>
> > <camel:to
> uri="file:/tmp/data/outbox?fileName=data.txt" />
> > </camel:pipeline>
> > </camel:route>
> > </camel:camelContext>
> >
> >
> > thanking you
> >
> > Kobe
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Simple-route-with-JMS-queue-is-not-working-tp4411810p4411810.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
Re: Simple route with JMS queue is not working
Posted by tobeand <to...@gmail.com>.
"A bean: endpoint cannot be defined as the input to the route; i.e.
you cannot consume from it, you can only route from some inbound
message Endpoint to the bean endpoint as output."
extracted from Bean Component (http://camel.apache.org/bean.html)
On Fri, May 20, 2011 at 1:47 PM, Kobe <kb...@gmail.com> wrote:
> I am trying to compose a route by connecting them via a jms queue.
> The route does not work. messages emitted by the srcText are not
> capture in the destination at all ("data.txt").
>
> can you tell if thre is a mistake in this? I use Camel 2.7.1.
>
>
> <camel:camelContext id="camelContext">
> <camel:route>
> <camel:from uri="bean:srcText" />
> <camel:to uri="jms:queue:order" />
> </camel:route>
> <camel:route>
> <camel:from uri="jms:queue:order" />
> <camel:pipeline>
> <camel:transform>
> <camel:simple>Hello ${body} how are you?</camel:simple>
> </camel:transform>
> <camel:to uri="file:/tmp/data/outbox?fileName=data.txt" />
> </camel:pipeline>
> </camel:route>
> </camel:camelContext>
>
>
> thanking you
>
> Kobe
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Simple-route-with-JMS-queue-is-not-working-tp4411810p4411810.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>