Previously posted to the JBOSS Fuse mailing list with no response Camel provides a nice capability in the dynamic router. However it inherits a weakness from routingSlip in that state must be kept inside the object with the method call. Is there a nice way to have a one time routing slip without saving state? currently you are forced to do something like this: (to determine that the second call is for the same message)
public class MessageDistributionDynamicRouter { //must keep state to stop the routing slip private volatile Object lastBody = null ; public String destinationQueue(@Header("sessionId") final String sessionId, @Body final Object body) { if (lastBody == body) { return null; } lastBody = body; //route to destination outbound queue return QueueName.getOutboundQueueName(sessionId) ; } } -- View this message in context: http://camel.465427.n5.nabble.com/Camel-DynamicRouter-requires-state-storage-inside-routing-bean-tp5758615.html Sent from the Camel - Users mailing list archive at Nabble.com.