Hello,

First time working with netty component and I run into issues while trying
to implement a chain of routes from a remote netty endpoint to ActiveMq
endpoint. I have a requirement that states a custom acknowledgement message
should be sent back to the remote netty endpoint. Different acknowledgement
messages are sent based on whether the exchange went well or failed in
Route2.

Routes are set up like this:

Route 1:
    from("remoteQueue")
    .to(remoteNettyEndpoint);

Route 2:
    from(myNettyEndpoint)
    .routePolicyRef("myRoutePolicy")
    .processRef("myProcessor")
    .to("myQueue");



myNettyEndpoint is a consumer server with sync option set to true in order
to enforce the InOut MEP. I was hoping that I could (ab)use this and put my
custom acknowledgement message into exchange like this:

exchange.getOut().setBody("ACK")

This is done in myRoutePolicy implementation that only implements the
onExchangeDone method.

remoteNettyEndpoint is a blackbox for me and it expects a custom
acknowledgement message when it send a message to myNettyEndpoint and that
message is processed by Route2.

In sunny day scenario, when there are no exceptions being thrown by
myProcessor which processes the message and puts the result into exchange, I
get a timeout exception 

org.apache.camel.ExchangeTimedOutException: The OUT message was not received
within: 20000 millis due reply message with correlationID ....

and the custom acknowledgement message I put into exchange in myRoutePolicy
implementation ends up on myQueue which I don't want to happen.

Can someone please point out where am I making the mistake here?

Regards,
Slavisa



--
View this message in context: 
http://camel.465427.n5.nabble.com/Netty-component-and-acknowledgement-message-tp5767915.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to