Dear all!

I am sure that this questions has been already asked. Apologies that you
have to look at it again.

I have a very trivial route, which uses InOut MEP:

@Component
public class InOutRouter extends RouteBuilder {
        
        public void configure() {
                from("jms:incomingOrders")
                .inOut("jms:validate");
                
                from("jms:validate")
                .bean(ValidatorBean.class);
        }

}

The bean is also very trivial:
public class ValidatorBean {
        
        private static Logger logger = Logger.getLogger(ValidatorBean.class);
        
        public void validateSmth(Exchange exchange) {
                logger.info("bean invoked!!!");
                String body = exchange.getIn().getBody(String.class);
                if(body.contains("SOMETHING")) {
                        exchange.getOut().setBody("Valid");
                } else {
                        exchange.getOut().setBody("Invalid");
                }
        }

}

The bean is invoked and I can see the logging output.
I can also see that the route works. The number of enqueued/dequeued
messages grows in both "incomingOrders" and "validate" queues.

However, I cannot see any kind of output after the bean execution is over.

Please, help me to find out what I am doing wrong or recommend what should I
do to process the reply (i.e., how and where can process the "Valid/Invalid"
bodies).

Thank you in advance.



--
View this message in context: 
http://camel.465427.n5.nabble.com/InOut-MEP-tp5767079.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to