camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gudiseashok <>
Subject Re: Creating routes dynamically like a for()
Date Wed, 09 Oct 2013 12:22:09 GMT
Now if you check my reply I have added all routes dynamically by specifying camel context and
route id for each route, if you do so and keep track of ids you have created for routes,

You can have another bean to do this
Get camelcontext (camelcontextid)
Get routes to stop by I'd,
Stop route

That's it. I have snippet too if you want further information.

"mamouros [via Camel]" <> wrote:

>	I haven't checked gudiseashok's solution but I ended up with the solution of multiple
threads created after a from("sql:...").to("bean:...) where inside the bean's calling function
is a for loop to create threads where the run() method of the Runnable is something like:

>run() { 
>         camelContext.addRoutes(new RouteBuilder() { 
>                        public void configure() { 
>                                 from("smpp://....") 
>                                 to(....) 
>                        } 
>        }); 
>thus creating my smpp receivers dynamically. 
>Now I only have to figure out a way to stop those routes and threads.. 	 	 	 	
>If you reply to this email, your message will be added to the discussion below:
>		 		To unsubscribe from Creating routes dynamically like a for(), click here.
>		NAML 	

View this message in context:
Sent from the Camel - Users mailing list archive at
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message