I assume you still want to integrate with Camel. First, I will review the camel documentation . After that, you will be disappointed, you will need to start experimenting. I have one example where I created Camel Processor as Netty Server. Netty components work so that the From endpoint is the server that consumes, and the To endpoint is the client that produces. I need the To endpoint, which was the server, and the component did not support this. I just implemented Camel Processor as a spring bean that started Netty Server when it was initialized. However, the JBoss Netty documentation and samples . It is worth overcoming them.
Here is my example. This is a server that sends a message to all connected clients. If you're new to Netty, I highly recommend going through the samples I linked above:
public class NettyServer implements Processor { private final ChannelGroup channelGroup = new DefaultChannelGroup(); private NioServerSocketChannelFactory serverSocketChannelFactory = null; private final ExecutorService executor = Executors.newCachedThreadPool(); private String listenAddress = "0.0.0.0";
}
source share