From users-return-19211-apmail-activemq-users-archive=activemq.apache.org@activemq.apache.org Thu May 28 08:24:08 2009 Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 63613 invoked from network); 28 May 2009 08:24:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 May 2009 08:24:08 -0000 Received: (qmail 92303 invoked by uid 500); 28 May 2009 08:24:20 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 92262 invoked by uid 500); 28 May 2009 08:24:20 -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 92248 invoked by uid 99); 28 May 2009 08:24:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2009 08:24:20 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chubrilo@gmail.com designates 209.85.220.216 as permitted sender) Received: from [209.85.220.216] (HELO mail-fx0-f216.google.com) (209.85.220.216) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2009 08:24:08 +0000 Received: by fxm12 with SMTP id 12so7253195fxm.38 for ; Thu, 28 May 2009 01:23:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type; bh=0GRV5xw4yJGvc87+ULTmmH7joVDpYDzFg1vrCA2OkKY=; b=V9M2qVR8piw1VLLKapJWFB85bgH/aIPk+dOPbYN+FalIIiv9fFZBPpfRhSaVoQsvrA ipTKgnHThxT5FoBkpwztma/Xc8lSHWDrZMFJzMVbqfzt5Ml8b13cJzuZoCVdeUiTLYvX Q1SsS6BE6lpH2se7LZ8vs9ytX9U+T/6KbMpeM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=d9ZsWnGw39Pd+0KhOUbyM7HQidBOzvA/SxrnWdAMU6+KrN9h94tPxFVtG9e4+w/qv3 KEazq+pMLiqLZBuOrNFoid9duTwE00L6pWjqNJh5BX+Nm1OwqMAYg5Xhfb7HIq4+jPtx 9i4kyZAcSBgns1mkINXeC6e5paSw11eAeqxb4= MIME-Version: 1.0 Sender: chubrilo@gmail.com Received: by 10.223.126.203 with SMTP id d11mr965817fas.8.1243499027965; Thu, 28 May 2009 01:23:47 -0700 (PDT) In-Reply-To: <23744774.post@talk.nabble.com> References: <23744774.post@talk.nabble.com> Date: Thu, 28 May 2009 10:23:47 +0200 X-Google-Sender-Auth: 533618ab7297b5b0 Message-ID: <36e91d9d0905280123i3ba8d78fh7304bbb0b3b6c7fb@mail.gmail.com> Subject: Re: Problem With Producer Flow Control? From: Dejan Bosanac To: users@activemq.apache.org Content-Type: multipart/alternative; boundary=001636c598d6d72745046af4ad6a X-Virus-Checked: Checked by ClamAV on apache.org --001636c598d6d72745046af4ad6a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Joe, I think problem is that your thread is blocked on producer send(), so no matter sessions and connections nothing else could be done until it is unblocked. Cheers -- Dejan Bosanac Open Source Integration - http://fusesource.com/ ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net On Wed, May 27, 2009 at 5:22 PM, Joe Fernandez < joe.fernandez@ttmsolutions.com> wrote: > > I am running some exception tests against AMQ 5.2 that force producer > flow-control to occur and have a question regarding sessions and flow > control. Here's my set up. > > Te test app, which is using an 'embedded' broker, has an object (Ob1) that > implements MessageListener. Ob1 creates two AMQ connections (con1, con2), a > session (s1) from con1, a session (s2) from con2, a producer (p1) from s1 > and a consumer (c2) from s2. The c2 consumer is assigned Ob1's onMessage() > method via c2.setMessageListener(this). The onMessage() method has a built > in delay to simulate a slow consumer. The ack mode is set to > AUTO_ACKNOWLEDGE. The producer and consumer are producing to and consuming > from the same destination, respectively. The message that is produced by p1 > is a relatively small text message; maybe 30 characters in length. > > When the test starts, p1 floods the queue with messages and producer flow > control kicks in, at which point p1 gets blocked. However, the calls to the > onMessage method also stop so the test hangs. Given that p1 and c2 are > operating within their own separate connections and sessions, shouldn't the > AMQ client code continue to call the onMessage method with messages even > when p1 gets placed in flow control mode? > > Side note: if I place con2, s2, and c2 in a separate thread object, then > the > test runs just fine. That is, the p1 producer goes in and out of flow > control as c2's onMessage continues to get called. > > Thanks, > Joe > > > > -- > View this message in context: > http://www.nabble.com/Problem-With-Producer-Flow-Control--tp23744774p23744774.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > --001636c598d6d72745046af4ad6a--