camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SteveR <>
Subject Re: How to specify the UDP source port with camel-netty4 ?
Date Mon, 14 Dec 2015 17:15:17 GMT
I'm using *Camel-2.16* and I'm looking at the GitHub code for the

, and I think the below highlighted code is what causes netty to specify
using an ephemeral port for the UDP source port when the camel-netty4
*udpConnectionlessSending* option is set to *true*.  It would be nice if it
wasn't hard-coded and let you specify a UDP source port of your choosing!
I'm hoping someone with more knowledge will chime in.

            // if udp connectionless sending is true we don't do a connect.
            // we just send on the channel created with bind which means
            // really fire and forget. You wont get an
            // if no one is listen on the port
            if (!configuration.isUdpConnectionlessSending()) {
                answer = connectionlessClientBootstrap.connect(new
InetSocketAddress(configuration.getHost(), configuration.getPort()));
            } else {
                *// bind and store channel so we can close it when stopping
                answer = connectionlessClientBootstrap.bind(new
                Channel channel =;

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message