BTW I think I have seen some UDP issue with camel-mina about acquiring/releasing mina byte buffer. Damm that API is not so easy to work with - should be improved in mina 2.0
So it could relate to your issue as well On Tue, Mar 10, 2009 at 8:43 AM, Claus Ibsen <[email protected]> wrote: > On Tue, Mar 10, 2009 at 2:39 AM, orton <[email protected]> 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/ > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/
