Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 40457 invoked from network); 14 Nov 2010 01:35:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Nov 2010 01:35:51 -0000 Received: (qmail 24145 invoked by uid 500); 14 Nov 2010 01:36:22 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 24078 invoked by uid 500); 14 Nov 2010 01:36:21 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 24069 invoked by uid 99); 14 Nov 2010 01:36:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Nov 2010 01:36:21 +0000 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=FREEMAIL_FROM,SPF_HELO_PASS,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.139.236.158 is neither permitted nor denied by domain of daniel.dlds@gmail.com) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Nov 2010 01:36:13 +0000 Received: from joe.nabble.com ([192.168.236.151]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1PHRVY-0008Nx-Mx for users@activemq.apache.org; Sat, 13 Nov 2010 17:35:52 -0800 Date: Sat, 13 Nov 2010 17:35:52 -0800 (PST) From: "daniel.dlds@gmail.com" To: users@activemq.apache.org Message-ID: <1289698552696-3041439.post@n4.nabble.com> Subject: Concurrent consumers MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello, I am facing a strange behaviour when running some test clients on 5.4.1 (also the same on 5.3.0). I first run a producer that sends some messages to a queue. Then I launch another client that creates two consumers for consuming the messages from the queue. The consumers are implemented in a class that creates a connection, session and queue receiver on the constructor. It includes a separate method for starting the connection. It also has the onMessage method. The two consumer objects are created. and then their connections can be started independently. The problem is that only the first consumer has its onMessage called. If I don't start the first consumer's connection and start the connection on the second, no messages are received by it. Is this behaviour correct ? Is it possible to have concurrent consumers ? For anyone that wants to test the example I have posted the source code on the net : producer (for producing the messages) : http://pastebin.com/dmhSExJK concurrent consumers (the problem reproduction) : http://pastebin.com/tgXh4M83 To use it start the broker from the distribution (running the bin/activemq script). But before edit the file conf/activemq.xml and edit the destinationPolicy element and set producerFlowControl to false. -- View this message in context: http://activemq.2283324.n4.nabble.com/Concurrent-consumers-tp3041439p3041439.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.