we have a scenario where message routing should happen based on the message content and different conditions. we will be storing the conditions in DB, conditions would configured at runtime by different app , we are planning keep this routing conditions in cache which routing app can access.
over all routing application job is figure out the next step (queue) based on message and conditions and put the message to correct queue so that related application pick the msg and process it.
Is there simple way to implement this scenario without using apache camel etc. conditions are simple equal, not equal etc inspecting the XML message.
You can do these kinds of dynamic routing with the Recipient List EIP of Camel. If the simple conditions like a header value etc are not sufficient, you can use a Java Bean method as Recipient List.
In this method you can access all parts of the message and do whatever you want. If you found out where the message must be sent to, simply return the Camel endpoint URI. For example
activemq:queue:myQueue.The recipient list can also send the (same) message to multiple endpoints if this is a requirement.