camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel 1.6/2.0 MINA UDP issue
Date Tue, 10 Mar 2009 07:43:18 GMT
On Tue, Mar 10, 2009 at 2:39 AM, orton <o_huang@yahoo.com> wrote:
>
> Hi,
>
> I've been trying to use the MINA component for UDP data delivery but have
> been having some issues and was wondering if anyone else has seen this
> error.
>
> I'm sending small packets (<100Bytes) as fast as I can (sequentially from a
> single client) but after around 35,000 packets sent, the Camel client
> abruptly stops without any errors/exceptions. I first tried this with the
> 1.6 release and saw this problem and recently downloaded and compiled the
> 2.0 core and components but still have the same issue. When I use MINA with
> TCP, I don't have this problem...
>
> Here's what I have for code:
> -----------------
>
>        public void init( String serverIP, int serverPort ) {
>                uri = "mina:udp://" + serverIP + ":" + serverPort + "?sync=false";
>                System.out.println("Camel URI: " + uri);
>        }
>
>        public void sendMessages(int numOfMessages, int messageSize) throws
> Exception {
>
>                CamelContext context = new DefaultCamelContext();
>                context.start();
>
>                Endpoint endpoint = context.getEndpoint(uri);
>                Exchange exchange =
> endpoint.createExchange(ExchangePattern.InOnly);
>                Producer producer = endpoint.createProducer();
>                producer.start();
>
>                for (int i = 0; i < numOfMessages; i++) {
>                        String s = "[Publisher]: Test Body Message: " + i;
>                        exchange.getIn().setBody(s);
>                        producer.process(exchange);
>                }
>            producer.stop();
>        }
>
>
> I looked through various forums and saw some memory leak issues, but wasn't
> sure if this is related?
>
> If anyone can help, would be much appreciated!!
What version of Camel and Mina are you using?

Mina is in the works of doing a Mina 2.0 that might be much better.
When its release we will upgrade it in Camel 2.0 as well.

Yes the memory leaks is interresting? Where did you find them?

And whats the relevanse of you test? Sending 65.000 udp packages to yourself?
Are you using Camel to be the Mina server as well? Or do you send it
to another JVM?

Using TCP that works. Are you using the exact same sample but just
change udp to tcp in the endpoint URI?



>
> Orton
> --
> View this message in context: http://www.nabble.com/Camel-1.6-2.0-MINA-UDP-issue-tp22426433p22426433.html
> Sent from the Camel - Development (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Mime
View raw message