You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Benedict Etzel <be...@gmail.com> on 2012/08/21 10:30:50 UTC

Netty UDP Consumer not listening

Hello,

I've got a problem concerning receiving UDP packets and passing them on to
the Camel route. No packets seem to be received via Camel/Netty, the UDP
consumer doesn't seem to be listening at all.

My configure() function is as follows:

public void configure() throws Exception {
from("netty:udp://localhost:8362/")
 .process(new Processor() {
 public void process(Exchange exchange) throws Exception {
  System.out.println(exchange.getIn().getBody());
 }
});
}

I can run multiple instances parallel with no errors from Camel (I assume
they should throw exceptions due to them listening on the same socket?),
Camel something similar to

INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.10.0
(CamelContext: camel-1) is starting
INFO org.apache.camel.management.ManagementStrategyFactory - JMX enabled.
INFO org.apache.camel.management.DefaultManagementLifecycleStrategy -
StatisticsLevel at All so enabling load performance statistics
INFO org.apache.camel.impl.converter.DefaultTypeConverter - Loaded 175 type
converters
INFO org.apache.camel.component.netty.NettyConsumer - Netty consumer bound
to: localhost:8362
INFO org.apache.camel.impl.DefaultCamelContext - Route: route1 started and
consuming from: Endpoint[udp://localhost:8362/]
INFO org.apache.camel.impl.DefaultCamelContext - Total 1 routes, of which 1
is started.
INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel 2.10.0
(CamelContext: camel-1) started in 0.739 seconds

If I change from UDP to TCP, suddenly only one instance can run at once
without exceptions (which sounds correct).
I checked for Firewall problems by implementing my own test receiver via
DatagramSocket.receive and that listens and receives correctly. Also,
Wireshark shows that ICMP messages about delivery errors are sent back when
using the Camel/Netty solution. I also tried MINA, but had the same problem
there.
Am I missing something here?

Thanks in advance for any help,
Benedict