[
https://issues.apache.org/jira/browse/CAMEL-6563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13712774#comment-13712774
]
Sam Patel edited comment on CAMEL-6563 at 7/18/13 8:32 PM:
-----------------------------------------------------------
To listen for UDP multicast addresses, I think the code may have to do some
different logic when binding to the IP address. I found this link on the web
which may have code that is relevant
(http://web.archiveorange.com/archive/v/z6Mf9AWgO1zZ4z3SHvGs)
The camel-netty code currently does this for UDP non-mulicast address (e.g.
localhost). This is in the SingleUDPNettyServerBootstrapFactory.java source
file.
Channel channel = connectionlessBootstrap.bind(hostAddress);
I think for UDP multicast address (e.g. 225.1.1.1), it needs to join a group on
a particular network interface. It might looks something like this:
DatagramChannel channel =
(DatagramChannel)connectionlessBootstrap.bind(hostAddress);
String networkInterface = configuration.getNetworkInterface() == null ?
LOOPBACK_INTERFACE : configuration.getNetworkInterface();
NetworkInterface multicastNetworkInterface =
NetworkInterface.getByName(networkInterface);
channel.joinGroup(hostAddress, multicastNetworkInterface);
was (Author: samel):
To listen for UDP multicast addresses, I think the code may have to do some
different logic when binding to the IP address. I found this link on the web
which may have code that is relevant
(http://web.archiveorange.com/archive/v/z6Mf9AWgO1zZ4z3SHvGs)
The camel-netty code currently does this for UDP non-mulicast address (e.g.
localhost). This is either in the SingleUDPNettyServerBootstrapFactory.java
source file.
Channel channel = connectionlessBootstrap.bind(hostAddress);
I think for UDP multicast address (e.g. 225.1.1.1), it needs to join a group on
a particular network interface. It might looks something like this:
DatagramChannel channel =
(DatagramChannel)connectionlessBootstrap.bind(hostAddress);
String networkInterface = configuration.getNetworkInterface() == null ?
LOOPBACK_INTERFACE : configuration.getNetworkInterface();
NetworkInterface multicastNetworkInterface =
NetworkInterface.getByName(networkInterface);
channel.joinGroup(hostAddress, multicastNetworkInterface);
> camen-netty - unable to consume on UDP multicast addresses
> ----------------------------------------------------------
>
> Key: CAMEL-6563
> URL: https://issues.apache.org/jira/browse/CAMEL-6563
> Project: Camel
> Issue Type: Bug
> Components: camel-netty
> Affects Versions: 2.11.0
> Environment: Karaf 2.3.1
> Java 7
> Ubuntu 12.04 (64 bit)
> Reporter: Sam Patel
> Priority: Minor
>
> When using a route to listen to UDP multicast address , no messages seem to
> get consumed. No exceptions are observed.
> Multicast address is defined as addresses in the range of 224.0.0.0 through
> 239.255.255.255 (http://en.wikipedia.org/wiki/Multicast_address)
> Input was simple string (e.g. "Test String")
> Example Route:
> <route>
> <from
> uri="netty:udp://225.1.1.1:8001?allowDefaultCodec=false&sync=false&broadcast=true"/>
> </route>
> Found an old topic in the user discussion forum that seems related. Did not
> find any unit tests in the Camel source code exercising this behavior.
> (http://camel.465427.n5.nabble.com/camel-netty-and-multicast-tt4638622.html)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira