简体   繁体   中英

Camel netty consumer not listen

I have a problem setting up camel netty consumer for 514 port in order to catch syslog messages. My route :

from("netty:udp://127.0.0.1:514?sync=false")
    .process(new Processor(){
        public void process(Exchange exchange) throws Exception {
            processor.processAntyMalwareLog(exchange);
        }
    }).log("I've got message");

application is starting:

Route: route3 started and consuming from: Endpoint[udp://127.0.0.1:514]

and 514 port is opened but not is not listening

>netstat -lnp | grep 514
udp6       0      0 127.0.0.1:514         :::*                                21513/java

I can see in tcpdump with tcpdump -i eth1 -nn -A -s 0 port 514 and udp that the messages are are being send and received properly.

Can anyone point me where I am doing mistake?

You need to use the client mode, eg set clientMode=true . See more details in the netty docs:

And upgrade and use Netty 4 if possible:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM