On Sun, Mar 20, 2011 at 5:49 AM, Robbie Gemmell <[email protected]>wrote:
> Your attachments were stripped (you need to link to items of any > significant > size) so it wasn't clear which broker you were discussing, but I ran the > test against the Java broker anyway and have identified an issue which > would > present itself particularly badly in this scenario (create consumer, > receive > one message from a queue containing many more messages, close consumer, > repeat). The problem is not actually related to the number of connections > but the number of consumers created combined with the fact that the queue > has a backlog of messages. > I am using the java message broker. In our environment there are a lot of consumers. thanks, Amila. > > > > I have raised a JIRA to track this and have initially classed it as a > release blocker: https://issues.apache.org/jira/browse/QPID-3157 > > > > Robbie > > > > From: Amila Suriarachchi [mailto:[email protected]] > Sent: 19 March 2011 07:57 > To: [email protected] > Cc: Justin Ross > Subject: Re: 0.10 release update - RC1 and status > > > > I tried to simulate a memory leak with occur in our environment by using > the > following program. > > public static void main(String[] args) { > try { > > Properties properties = new Properties(); > properties.put("connectionfactory.qpidConnectionfactory", > > "amqp://admin:admin@clientID/test?brokerlist='tcp://localhost:5672'"); > properties.put("queue.queueName", "myQueue"); > properties.put("java.naming.factory.initial", > "org.apache.qpid.jndi.PropertiesFileInitialContextFactory"); > final Context context = new InitialContext(properties); > > Runnable messageReceiver = new Runnable() { > > public void run() { > while (true) { > try { > ConnectionFactory connectionFactory = > (ConnectionFactory) context.lookup("qpidConnectionfactory"); > Connection connection = > connectionFactory.createConnection(); > connection.start(); > > Session session = > connection.createSession(false, Session.AUTO_ACKNOWLEDGE); > > Destination destination = (Destination) > context.lookup("queueName"); > MessageConsumer messageConsumer = > session.createConsumer(destination); > TextMessage textMessage = (TextMessage) > messageConsumer.receive(); > System.out.println(textMessage.getText()); > messageConsumer.close(); > session.close(); > connection.stop(); > connection.close(); > } catch (JMSException e) { > e.printStackTrace(); > } catch (NamingException e) { > e.printStackTrace(); > } > > } > } > }; > > Thread messageReceiveThread = new Thread(messageReceiver); > messageReceiveThread.start(); > > // let consumer to start first. > Thread.sleep(2000); > > for (int i = 0; i < 10000; i++) { > ConnectionFactory connectionFactory = (ConnectionFactory) > context.lookup("qpidConnectionfactory"); > Connection connection = > connectionFactory.createConnection(); > connection.start(); > > Session session = connection.createSession(false, > Session.AUTO_ACKNOWLEDGE); > > Destination destination = (Destination) > context.lookup("queueName"); > > MessageProducer messageProducer = > session.createProducer(destination); > > TextMessage message = session.createTextMessage("Hello world > message to test the qpid " + i); > messageProducer.send(message); > > messageProducer.close(); > session.close(); > connection.stop(); > connection.close(); > > Thread.sleep(50); > > } > > } catch (Exception exp) { > > exp.printStackTrace(); > > } > } > > After running this for about 7000 messages, Qpid server goes out of memory. > Please see the attachments. > > I think this is a problem with connection removing when creating a lot of > connections. > > thanks, > Amila. > > > > > On Sat, Mar 19, 2011 at 12:25 PM, Amila Suriarachchi > <[email protected]> wrote: > > I tried to create a durable queue like this > > queue = queueSession.createQueue("myQueue;{create:always, node:{durable: > True}}"); > QueueSender queueSender = queueSession.createSender(queue); > queueSender.send(textMessage); > > and getting this exception. > > Caused by: java.lang.ClassCastException: java.lang.Boolean cannot be cast > to > java.lang.String > at > > org.apache.qpid.client.messaging.address.AddressHelper.getDurability(Address > Helper.java:237) > at > > org.apache.qpid.client.messaging.address.AddressHelper.fillInCommonNodeArgs( > AddressHelper.java:222) > at > > org.apache.qpid.client.messaging.address.AddressHelper.createQueueNode(Addre > ssHelper.java:215) > at > > org.apache.qpid.client.messaging.address.AddressHelper.getSourceNode(Address > Helper.java:254) > at > > org.apache.qpid.client.AMQDestination.rebuildTargetAndSourceNodes(AMQDestina > tion.java:888) > at > > org.apache.qpid.client.AMQSession_0_10.resolveAddressType(AMQSession_0_10.ja > va:1272) > > thanks, > Amila. > > > > On Fri, Mar 18, 2011 at 9:26 PM, Justin Ross <[email protected]> wrote: > > On Fri, 18 Mar 2011, Robert Godfrey wrote: > > I know Gordon said: > > > "Specifically I'd suggest that unless anyone has specific updates to the > following artefacts - and volunteers to verify the artefact for the release > - we remove them from the published list: > > qpid-dotnet-0-8-0.10-beta.zip > qpid-dotnet-0-10-0.10-beta. > zip > qpid-ruby-0.10-beta.tar.gz > > This will avoid giving false impressions about ongoing maintenance for > these > clients" > > But I think that if we are going to actually do this, we should formally > vote for it, and move the codebases for these artefacts into an "attic" > directory or similar. > > I'm not against removing unloved and unmaintained code... but I do feel > that > we should vote before adding or removing artefacts to/from the release. > > > > Okay. I'll restore these to RC2 unless there's a vote to remove them. > > Justin > > > > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:[email protected] > > > > > > -- > Amila Suriarachchi > WSO2 Inc. > blog: http://amilachinthaka.blogspot.com/ > > > > > -- > Amila Suriarachchi > WSO2 Inc. > blog: http://amilachinthaka.blogspot.com/ > > -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/
