I am working on an app based on Apache Camel and I want to use Camel as a
Log4j socket endpoint. I have Camel configured using netty and object
deserialization using the ObjectDecoder. According to the Log4j documents,
the log events should come to me as a serialized LoggingEvent object.
So when I try and send an event to my Camel application, its never
received. I check wireshark and the event is going over the socket. So
what am I doing wrong?
My Camel app is:
PropertyPlaceholderDelegateRegistry delRegistry =
(PropertyPlaceholderDelegateRegistry)getContext().getRegistry();
JndiRegistry registry = (JndiRegistry)delRegistry.getRegistry();
List<ChannelHandler> decoders = new LinkedList<ChannelHandler>();
List<ChannelHandler> encoders = new LinkedList<ChannelHandler>();
encoders.add( new ObjectEncoder());
decoders.add( ChannelHandlerFactories.newObjectDecoder() );
registry.bind("decoders", decoders);
registry.bind("encoders", encoders);
from("netty:tcp://
127.0.0.1:9999?sync=false痧⡵=#decoders穷⡵=#encoders")
.to("log:9999?showAll=true");
I have also tried this configuration and I am not receiving any data:
from("netty:tcp://127.0.0.1:9999?sync=false뗬涖⧞=false")
.to("log:9999?showAll=true");
Log4j socket endpoint. I have Camel configured using netty and object
deserialization using the ObjectDecoder. According to the Log4j documents,
the log events should come to me as a serialized LoggingEvent object.
So when I try and send an event to my Camel application, its never
received. I check wireshark and the event is going over the socket. So
what am I doing wrong?
My Camel app is:
PropertyPlaceholderDelegateRegistry delRegistry =
(PropertyPlaceholderDelegateRegistry)getContext().getRegistry();
JndiRegistry registry = (JndiRegistry)delRegistry.getRegistry();
List<ChannelHandler> decoders = new LinkedList<ChannelHandler>();
List<ChannelHandler> encoders = new LinkedList<ChannelHandler>();
encoders.add( new ObjectEncoder());
decoders.add( ChannelHandlerFactories.newObjectDecoder() );
registry.bind("decoders", decoders);
registry.bind("encoders", encoders);
from("netty:tcp://
127.0.0.1:9999?sync=false痧⡵=#decoders穷⡵=#encoders")
.to("log:9999?showAll=true");
I have also tried this configuration and I am not receiving any data:
from("netty:tcp://127.0.0.1:9999?sync=false뗬涖⧞=false")
.to("log:9999?showAll=true");