camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From soumya_sd <>
Subject Options for creating dynamic filters
Date Sun, 29 Jul 2012 04:47:27 GMT

I've the following static route that is loaded at my server startup. It
listens for UDP messages on a port and pushes these messages to the seda
queue defined in the route below. 


Now I can have multiple clients that want to receive/subscribe to these
messages. They also want to dynamically select which feeds they need. 
Each client send a subscription request (REST) to the server (implemented
using Spring-MVC, Jetty, Camel). 
As soon as the server receives a request I create a new Camel route that
looks like: 

					.routeId(RouteIdCreator.createRouteId(toIP, toPort, "sometag"))

Once this route is deployed it will start to send UDP messages to the
client_ip_address: 20001 (as specified in the dynamic route above.) 

The client can send different filters to the server. 

In case this server receives the new filter it does the following 
1. checks if there is a route running (based on client ip and port) 
2. If there is route running it stops that route and deletes this route with
the older filter
3. It then recreates a new route which differs from the last route only in
the xpathfilter. 

My issue is that step 2 takes a lot of time (to stop and restart)

Is there is a way to resolve this issue? 
Basically I want to change the XPath expression in the route without
stops/migrating the route. 


PS: I've also posted this question on Stackoverflow. 


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message