Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 37304 invoked from network); 29 Jul 2007 23:26:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jul 2007 23:26:13 -0000 Received: (qmail 56036 invoked by uid 500); 29 Jul 2007 23:26:04 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 55961 invoked by uid 500); 29 Jul 2007 23:26:03 -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 55921 invoked by uid 99); 29 Jul 2007 23:26:03 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Jul 2007 16:26:03 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Jul 2007 23:25:57 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IFI8m-0005Ch-M1 for users@activemq.apache.org; Sun, 29 Jul 2007 16:25:36 -0700 Message-ID: <11856245.post@talk.nabble.com> Date: Sun, 29 Jul 2007 16:25:36 -0700 (PDT) From: Ladlestein To: users@activemq.apache.org Subject: Re: ActiveMQ onMessage() callback not async In-Reply-To: <11836836.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: ribs@acm.org References: <11836836.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org If you look at the javadocs for http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/MessageListener.html MessageListener , you'll see that the Session backing your listener won't call onMessage while a previous onMessage invocation has yet to return. I'm puzzled why they even need to say that, though, because a http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/Session.html Session is a single-threaded context. If you want concurrent message processing, you will need multiple threads; using multiple Sessions might be the way to go. Someone else with more expertise here could say more. sparky2708 wrote: > > I am finding that when I receive messages in my java client that I can > only process one request at a time. It seems like the method: > onMessage(Message arg) from MessageListener interface doesn't get called > asynchronously. Do I need to start a thread in this method to get the > async behavior that I am looking for or am I missing some option when I > subscribe? > -- View this message in context: http://www.nabble.com/ActiveMQ-onMessage%28%29-callback-not-async-tf4160185s2354.html#a11856245 Sent from the ActiveMQ - User mailing list archive at Nabble.com.