You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by vsp <v-...@mail.ru> on 2007/11/14 08:44:17 UTC

Question about Camel routing

I need migrate from Servicemix-eip to Camel.
I have for example this route:

                     eip:static-router
                       |                |
Quartz --- eip:pipeline     SE_1  ---  eip:content-based-router --
eip:static-router1 -- SE_11 ---
                                                                |     |    |   
|  |  |                                               |
                                                                |     |    |   
|  |   --------------------------------------
                                                                |     |    |   
|    ---- eip:static-router2 --- SE_12 --
                                                                |     |    |   
|                                                     |
                                                                |     |    |    
-------------------------------------------
                                                                |     |   
--- eip:static-router3 --- SE_13 ---
                                                                |     |                                                    
|
                                                                |     
-------------------------------------------
                                                                |
                                                              SE_2         


<beans 	xmlns:eip="http://servicemix.apache.org/eip/1.0"
		xmlns:collector="http://www.mycompany.com/collector">
	
	<eip:pipeline service="collector:pipeline" endpoint="endpoint">
	    <eip:transformer>
	    	<!-- Destination target service -->
	      <eip:exchange-target service="collector:start-route" />
	    </eip:transformer>
	    <eip:target>
	    	<!-- Return response to this service -->
	      <eip:exchange-target service="collector:trace" />
	    </eip:target>
	</eip:pipeline>
	
	<eip:static-routing-slip service="collector:start-route"
endpoint="start-route">
		<eip:targets>
			<eip:exchange-target service="collector:starter"/> 
		 	<eip:exchange-target service="collector:router"/> 
		</eip:targets>
	</eip:static-routing-slip>
	
	
	<eip:content-based-router service="collector:router" endpoint="router">
		<eip:rules>
			<eip:routing-rule>
				<eip:predicate>
					<eip:xpath-predicate xpath="/body"  />
				</eip:predicate>
				<eip:target>
					<eip:exchange-target service="collector:dispatch-route" />
				</eip:target>
			</eip:routing-rule>

			<eip:routing-rule>
				<eip:predicate>
					<eip:xpath-predicate xpath="/task"  />
				</eip:predicate>
				<eip:target>
					<eip:exchange-target service="collector:transport-route" />
				</eip:target>
			</eip:routing-rule> 

			<eip:routing-rule>
				<eip:predicate>
					<eip:xpath-predicate xpath="/parser"/>
				</eip:predicate>
				<eip:target>
					<eip:exchange-target service="collector:parser-route" />
				</eip:target>
			</eip:routing-rule>

			<eip:routing-rule>
				<eip:target>
					<eip:exchange-target service="collector:finalize" />
				</eip:target>
			</eip:routing-rule>
		</eip:rules>
	</eip:content-based-router>
	
	<eip:static-routing-slip service="collector:transport-route"
endpoint="transport-route">
		<eip:targets>
			<eip:exchange-target service="collector:transporter"/>
			<eip:exchange-target service="collector:router"/>
		</eip:targets>
	</eip:static-routing-slip>
	
	<eip:static-routing-slip service="collector:parser-route"
endpoint="parser-route">
		<eip:targets>
			<eip:exchange-target service="collector:parser"/>
			<eip:exchange-target service="collector:router"/>
		</eip:targets>
	</eip:static-routing-slip>

	<eip:static-routing-slip service="collector:dispatch-route"
endpoint="dispatch-route">
		<eip:targets>
			<eip:exchange-target service="collector:dispatcher"/>
			<eip:exchange-target service="collector:router"/>
		</eip:targets>
	</eip:static-routing-slip>
	
</beans>


How to make it in Camel? Camel examples shows only simple point-to-point
routes. I can't understand how to make links between this simple routes.
-- 
View this message in context: http://www.nabble.com/Question-about-Camel-routing-tf4803019s12049.html#a13741678
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Question about Camel routing

Posted by pratibhaG <pr...@in2m.com>.
Thanks for your reply. i got it

-- 
View this message in context: http://www.nabble.com/Question-about-Camel-routing-tp13741678p17081746.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Question about Camel routing

Posted by Guillaume Nodet <gn...@gmail.com>.
It seems the camel site has some problems and examples do not appear.
You should download the latest camel distribution and you'll find the
documentation inside.

On Tue, May 6, 2008 at 12:41 PM, pratibhaG <pr...@in2m.com> wrote:
>
>  Hi,
>  I am facing the same problem. i want to implement content based routing
>  using camel.
>  could you make some progress?
>
>  thanks,
>  Pratibha
>  --
>  View this message in context: http://www.nabble.com/Question-about-Camel-routing-tp13741678p17080111.html
>  Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Question about Camel routing

Posted by pratibhaG <pr...@in2m.com>.
Hi,
I am facing the same problem. i want to implement content based routing
using camel.
could you make some progress?

thanks,
Pratibha
-- 
View this message in context: http://www.nabble.com/Question-about-Camel-routing-tp13741678p17080111.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Question about Camel routing

Posted by James Strachan <ja...@gmail.com>.
2008/5/6 pratibhaG <pr...@in2m.com>:
>
>  Hi,
>  I am also a novice to all this but here is a link which I think will be
>  helpful for you.
>
>  http://209.85.175.104/search?q=cache:wX2Kv3m61CYJ:people.apache.org/~chirino/camel-manual-1.1-SNAPSHOT.pdf+camel-context.xml+timer&hl=en&ct=clnk&cd=16

FWIW I've just made the snapshot of the manual available...
http://cwiki.apache.org/CAMEL/manual-downloads.html

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Re: Question about Camel routing

Posted by pratibhaG <pr...@in2m.com>.
Hi,
I am also a novice to all this but here is a link which I think will be
helpful for you.

http://209.85.175.104/search?q=cache:wX2Kv3m61CYJ:people.apache.org/~chirino/camel-manual-1.1-SNAPSHOT.pdf+camel-context.xml+timer&hl=en&ct=clnk&cd=16

Regard,
Pratibha
-- 
View this message in context: http://www.nabble.com/Question-about-Camel-routing-tp13741678p17081851.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.