we tried to set up a custom encoder with netty tcp.

Here was our encoder class, for testing:

@Component("EndOfLineEncoder")
public class EndOfLineEncoder extends OneToOneEncoder{
    
    @Override
    protected Object encode(ChannelHandlerContext channelHandlerContext,
            Channel channel, Object msg) throws Exception {
        
        return msg;
    }

}

Here was our routing:

        from("stream:in")
            .to("log:response")
           
.to("netty:tcp://localhost:10121?sync=true&encoder=#EndOfLineEncoder")
            .to("log:response");


We tried to debug this problem for yours. We finally found out, that it
works, if we change encoder to encoders:

.to("netty:tcp://localhost:10121?sync=true&encoders=#EndOfLineEncoder")

So i guess it may be a bug - it is a single encoder, but it doesnt work if
we use encoder command.


--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-netty-encode-bug-tp4825369p4825369.html
Sent from the Camel Development mailing list archive at Nabble.com.

Reply via email to