Sorry for the many message ;) We have this scenario: a bean.-component send a message to a camel-component that read this message and then wait for another message from another queue. The right pattern is a PollingConsumer. We have reading this http://activemq.apache.org/camel/polling-consumer.html http://activemq.apache.org/camel/polling-consumer.html but we doesn't understand where we have to wrote this code.. So we have wrote this:
//BEAN MessageExchange newExchange = [createExchange]; channel.send(newExchange); // we send to "http://icar.unibas.it/FreESBee/Queue1" //CAMEL public void configure() throws Exception { this.from("jbi:service:http://icar.unibas.it/FreESBee/Queue1") //So we receive the message from bean component .process(new Processor(){ public void process(Exchange exchange) throws Exception { logger.info("PollingConsumer: processo la richiesta" + exchange.getIn().getBody()); Endpoint endpoint = getContext().getEndpoint("vm:prova"); PollingConsumer consumer = endpoint.createPollingConsumer(); Exchange newExchange = consumer.receive(); logger.info("*********** MESSAGGIO RICEVUTO ******** "); } }); The questions are: 1. where write the polling consumer? is right into a processor? 2. what kind of queue we have to use for listening for our scenario? "vm" or "jbi"? -- View this message in context: http://www.nabble.com/PollingConsumer-with-camel-tf4514495s12049.html#a12876353 Sent from the ServiceMix - User mailing list archive at Nabble.com.
