I'm currently building a demonstrator using ServiceMix as a test of what can be done with ServiceMix, I have version 3.2.1 (and Fuse 3.3.1.4). Sun Java 1.6 update 6
The application takes the following form: 2 JMS queues connected by a camel route. Messages of two types come into the first queue and are to be routed to one of two services. Service 1: logs information from the message (this will also be used for other purposes). Service 2: is intended to receive messages from multiple instances of this route and decide which to forward on to the second queue potentially modifying it in passing. I need to filter the messages being sent to Service 2 based on the information logged in Service 1. I've tried the following mechanisms without success: a) Use a camel Pipline to route the messages from the JMS Queue to an additional filtering service (which will send a sync InOut request to Service 1 as in the loan broker example) and then on to Service 2 if it passes the test. This does not work as the exchange received from Camel appears to be InOnly and thus I can't control forwarding it on to Service 2. I also can't find a way to set it to be InOut and I believe Camel does not actually support InOptionalOut yet (no examples of InOptionalOut available in any documentation/forums for Servicemix either). I believe the setting of MEP type is muted for release 1.5 of Camel. b) Use a camel filter with a Pojo expression bean and then get that bean to send the sync InOut request to Service 1 and return true/false based on the response, thus controlling the passing of the message to Service 2 via the camel filter. This does not work as I get a org.apache.servicemix.jbi.NotInitialisedYetException from the expression bean. I can't find a way to have the same bean instance used by the filter and be an initialised messaging bean. Does anyone have any suggestion on how I could get this to work. Thanks Chris -- View this message in context: http://www.nabble.com/Issues-filtering-with-beans-and-Camel-tp18985435p18985435.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
