Great idea... http://cwiki.apache.org/CAMEL/how-do-i-invoke-camel-routes-from-jbi.html
2008/5/17 Claus Ibsen <[EMAIL PROTECTED]>: > Great question and answer. Roman, it would be nice if it was added to the FAQ > of Camel and/or Servicemix. > > Med venlig hilsen > > Claus Ibsen > ...................................... > Silverbullet > Skovsgårdsvænget 21 > 8362 Hørning > Tlf. +45 2962 7576 > Web: www.silverbullet.dk > -----Original Message----- > From: Roman Kalukiewicz [mailto:[EMAIL PROTECTED] > Sent: 16. maj 2008 18:08 > To: [email protected] > Subject: Re: camel-context node as a targetservice for jms:endpoint ? > > 2008/5/16 rmunjuluri <[EMAIL PROTECTED]>: >> >> I have a simple jms:endpoint node configurted to receive messages on a >> "my.queue" in Servicemix. It currently receives messages and sends to a >> TraceBean configured as a targetservice. Now I would like to replace the >> TraceBean and apply the Camel routing to the incoming message to send the >> message to an other jms:endpoint (provider) to a queue defined in JBoss. >> >> This seems like a simple message forwarding scenario, but, I cant seem to >> find docs on how to tie the jms:consumer/endpoint to camel. Is there a way >> to specify the targetService of the Jms:consumer/endpoint as the >> camel-context id? or will Camel-context pick up the message and forward as >> per routing defined in the context? > > Here you have some documentation: > > http://activemq.apache.org/camel/jbi.html > > Maybe it is not very clearly stated at the wiki page, but when you write > > from("jbi:endpoint:http://foo.bar.org/MyService/MyEndpoint") > > you automatically expose the endpoint to the bus where service qname > is {http://foo.bar.org}MyService and endpoint name is MyEndpoint. > > All you have to do is to send messages from jms:endpoint to this JBI > endpoint (the same way as you send messages to EIP endpoints) and it > will pick it up the same way as it picks any other message messages. > > Sending works in the same way: you use > to("jbi:endpoint:http://foo.bar.org/MyService/MyEndpoint") to send > messages to JBI endpoint deployed to the bus. It could be jms:endpoint > or anything else. > > I noticed that people are used to somehow 'declaring' endpoints in > SMX. In camel it is enough to simply start a flow from a jbi endpoint > and camel will create it automatically. > > Roman > -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com
