camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SteveR <>
Subject Re: Camel netty: How to send UDP reply based on NETTY_REMOTE_ADDRESS?
Date Mon, 26 Oct 2015 15:25:14 GMT
Below is what I found that seems to work, with one issue that I can't yet
figure out:

After sending some test data into my application, and when I subsequently
use *VisualVM* to examine this Camel JMX MBean route, it always shows all
exchanges as *InflightExchanges* (i.e. the exchanges never show as

Any thoughts on how to debug this issue?

  Thanks, SteveR

        // I extract the remote address in my processor, get the remote host
and remote port,
        // and set them as input headers on the exchange.

	Message inMsg = exchange.getIn();
	String remoteAddress =
	String[] remoteAddressParts = remoteAddress.split(":");
	String remoteHost = remoteAddressParts[0].replace("/", "");
	String remotePort = remoteAddressParts[1];
	inMsg.setHeader("REMOTE_HOST_IP", remoteHost);
	inMsg.setHeader("REMOTE_PORT_NUMBER", remotePort);

        // This in my route, I use recipientList EIP and the simple language
to dynamically add them to the netty URI.

		.threads(threadPoolSize /*poolSize*/, threadPoolSize * 2 /*maxPoolSize*/)
			.threadName("threads_" + sourceRouteId + "_ACK_QUEUE")
		.recipientList( // See
				"netty:udp://${header.REMOTE_HOST_IP}:" +
				"${header.REMOTE_PORT_NUMBER}?" +

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

View raw message