When you send the message to the JMS queue you have to consider what thats should be
- inOnly (aka fire and forget)
- inOut (aka request-reply)
What happens now is the file polling will be in inOnly mode, which means the messages is send as fire and forget to the message queue. And then right thereafter processed in that pipeline.
It seems JBI is less forgiving about if the exchange pattern isn't configured as it expects. So you may want to change the exchange pattern to InOut.
There is a .setExchangePattern(ExchangePattern.InOut) you can use.
First, thanks for you reply.
Then, I have to change the MEP of the polling or of the JMS Queue ?
But even if I change these MEPs, it didn't resolve my problem I think..
Indeed, I'm trying to use the pipeline EIP to redirect the output of my A bean to the input of my B bean.. but it don't work as I said
To resume my problem I just want that when there is a new message into my JMS queue, I call a Bean component (with an In-Out MEP) and camel redirect this call to a In-Only MEP (like a file sender component)
You change the MEP where you need it changed.
If you do it after the JMS queue, then you do a fire and forget send message to the JMS queue, as it was InOnly.
Yes, it was the correct solution.
For the next who will have this error, you have to add:
Thanks for your help!