骆驼netty消费者不听
Camel netty consumer not listen
我在为 514
端口设置 camel
netty
消费者以捕获 syslog
消息时遇到问题。
我的 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");
申请开始:
Route: route3 started and consuming from: Endpoint[udp://127.0.0.1:514]
和514
端口打开但不是没有监听
>netstat -lnp | grep 514
udp6 0 0 127.0.0.1:514 :::* 21513/java
我可以在 tcpdump
和 tcpdump -i eth1 -nn -A -s 0 port 514 and udp
中看到消息正在正确发送和接收。
谁能指出我哪里做错了?
您需要使用客户端模式,例如设置clientMode=true
。在 netty 文档中查看更多详细信息:
并尽可能升级和使用 Netty 4:
我在为 514
端口设置 camel
netty
消费者以捕获 syslog
消息时遇到问题。
我的 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");
申请开始:
Route: route3 started and consuming from: Endpoint[udp://127.0.0.1:514]
和514
端口打开但不是没有监听
>netstat -lnp | grep 514
udp6 0 0 127.0.0.1:514 :::* 21513/java
我可以在 tcpdump
和 tcpdump -i eth1 -nn -A -s 0 port 514 and udp
中看到消息正在正确发送和接收。
谁能指出我哪里做错了?
您需要使用客户端模式,例如设置clientMode=true
。在 netty 文档中查看更多详细信息:
并尽可能升级和使用 Netty 4: