Hi:

*What I'm using:* Linux RHEL6, Camel 2.15.3, netty3, Java 1.7

I have to deliver my Camel application to production soon and I have a big
problem that I can't figure out.

I have a route that consumes from a *SEDA *queue, formulates a UDP
acknowledgement from the received exchange body, and then sends the ack back
to the associated UDP client specified in the
*NettyConstants.NETTY_REMOTE_ADDRESS* header on the exchange.

The UDP acks do get sent out, which I have verified via tcpdump, but when I
look at the Camel JMX route statistics (using VisualVM) it shows that all
exchanges flowing through this ack-back route are marked as
*ExchangesInflight* and remain that way.  If I run a long test, say sending
in a million messages, the application experiences
*java.net.SocketException: Too many open files.*

I'm including my route below.  By the way, I'm using the route-scoped
*onCompletion().onCompleteOnly()* approach within another route to send to
this ack-back route.

Any help on how to fix this is desperately needed and greatly appreciated!!!

I was also hoping that adding  .stop()
<http://camel.apache.org/maven/camel-2.15.0/camel-core/apidocs/org/apache/camel/model/ProcessorDefinition.html#stop%28%29>
  
to the route would force it to mark each exchange as completed, but it
doesn't appear to.

Also, the only reason I'm using the *recipientList* EIP is because of the
suggestion on the  How do I use dynamic URI
<http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html>   webpage. So
far, it's the only way I could figure out how to dynamically apply the
remote host and remote port to the netty URI.  I only need to send each ACK
to a single UDP client host, but I don't know of any other way to make it
work dynamically.  You would think that if there is a
*NettyConstants.NETTY_REMOTE_ADDRESS* header on the exchange that there
would be a way to tell *camel-netty* to just use that remote address.

  Thanks, SteveR


from(uri="seda:SEDA_ACK_QUEUE?size=200000&concurrentConsumers=10&waitForTaskToComplete=Never&failIfNoConsumers=true&timeout=1000")
                .setExchangePattern(ExchangePattern.InOnly)
                .routeId(ackQueueRouteId)
                .startupOrder(ackQueueRouteStartupOrder)
                .setProperty(Exchange.CHARSET_NAME,
ExpressionBuilder.constantExpression(charsetName))
                .threads(threadPoolSize /*poolSize*/, threadPoolSize * 2 
/*maxPoolSize*/)
                        .threadName("threads_" + sourceRouteId + "_ACK_QUEUE")
                .process(cqmsAckBackProcessor).id(cqmsAckBackProcessorId)  // 
Formulate
ACK
                .recipientList( // See
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
                        simple(
                                "netty:udp://${header.REMOTE_HOST_IP}:" +
                                "${header.REMOTE_PORT_NUMBER}?" +
                                
"clientPipelineFactory=#MY_CLIENT_PIPELINE_FACTORY&" +
                                
"sendBufferSize=26214400&allowDefaultCodec=false"
                        )
                )
                .setExchangePattern(ExchangePattern.InOnly)
                .stop() // Stops subsequent routing of the current Exchange and 
marks it
as completed.
        .end();     // Ends the current block.





--
View this message in context: 
http://camel.465427.n5.nabble.com/NEED-HELP-Exchanges-remain-inflight-on-route-with-recipientList-to-netty-udp-tp5773079.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to