Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 70149 invoked from network); 14 May 2008 02:02:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 May 2008 02:02:09 -0000 Received: (qmail 43773 invoked by uid 500); 14 May 2008 02:02:10 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 43749 invoked by uid 500); 14 May 2008 02:02:10 -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 43738 invoked by uid 99); 14 May 2008 02:02:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 May 2008 19:02:10 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [72.22.94.67] (HELO virtual.halosg.com) (72.22.94.67) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 May 2008 02:01:22 +0000 Received: (qmail 30652 invoked from network); 13 May 2008 20:48:30 -0500 Received: from 72-19-171-38.static.mesanetworks.net (HELO ?192.168.3.156?) (72.19.171.38) by halosg.com with SMTP; 13 May 2008 20:48:30 -0500 Message-ID: <482A4821.3090802@hanik.com> Date: Tue, 13 May 2008 20:02:09 -0600 From: Filip Hanik - Dev Lists User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: users@activemq.apache.org Subject: Re: Question about Producer Consumer usage References: <17170621.post@talk.nabble.com> <17198384.post@talk.nabble.com> <4829107B.6010108@hanik.com> <17214415.post@talk.nabble.com> <4829E250.1020508@hanik.com> <17221085.post@talk.nabble.com> In-Reply-To: <17221085.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org paste it into the email or provide a link to it, attachment dont make it to the user list Filip jaya_srini wrote: > Hi Filip > > I have attached the file "thread_dump.txt" that gives the thread-dump. > > if you need more info please let me know. > > thanks! > jaya > > > Filip Hanik - Dev Lists wrote: > >> that is a thread dump for one (1) thread, why don't you post the entire >> thread dump for all threads >> >> Filip >> >> jaya_srini wrote: >> >>> thanks for the response, Filip! >>> >>> Thread dump below is what we got on the client side. I'll try and see if >>> I >>> can get a better dump. So what would be the resolution for this? Will >>> enabling the jms.useAsyncSend property on the connection URI help fix >>> this >>> i.e cause the send to be asynchronous so that it doesn't block? >>> >>> daemon prio=6 tid=0x3793f400 nid=0x1f28 waiting for monitor entry >>> [0x38aff000..0x38affc98] >>> java.lang.Thread.State: BLOCKED (on object monitor) >>> at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1587) >>> - waiting to lock <0x07c45ea0> (a java.lang.Object) >>> at >>> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:226) >>> at >>> org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:268) >>> at >>> org.apache.activemq.ActiveMQTopicPublisher.publish(ActiveMQTopicPublisher.java:146) >>> >>> >>> Filip Hanik - Dev Lists wrote: >>> >>> >>>> as I mentioned, the blocking happens on the mutex for an >>>> ActiveMQSession, the only way you can end up blocking two threads there, >>>> is if two threads are using the same session, >>>> >>>> can you post the complete thread dump? >>>> >>>> thanks >>>> Filip >>>> >>>> jaya_srini wrote: >>>> >>>> >>>>> So Sorry! :( >>>>> >>>>> I just thought I would explain our scenario in more details. >>>>> >>>>> >>>>> jaya_srini wrote: >>>>> >>>>> >>>>> >>>>>> Hello >>>>>> >>>>>> Apologies for all the questions but I am a newbie to ActiveMQ and I >>>>>> would >>>>>> really like to better understand how the ActiveMQ broker works and was >>>>>> wondering if someone can explain how it would work for the scenario >>>>>> below: >>>>>> >>>>>> I am using single session with 1 producer and 1 consumer (durable >>>>>> Topic >>>>>> subscrber) for producing and consuming messages i.e the same session >>>>>> produces and consumes messages. The session/producer/consumer are >>>>>> created >>>>>> in app startup once and are reused through out. >>>>>> >>>>>> There is a message listener on the consumer for receiving messages >>>>>> asynchrounously. >>>>>> >>>>>> Messages are persistent (written to the database) and we are using the >>>>>> Publish-Subscribe model. >>>>>> >>>>>> The client APP (that send and receives the message) and the ActiveMQ >>>>>> broker are on different machines so I use a TCP transport to establish >>>>>> connection with a failover protocol so the connection URI looks like >>>>>> below >>>>>> >>>>>> failover:(tcp://:61616/) >>>>>> >>>>>> We are using ActiveMq 5.0.0 >>>>>> >>>>>> Given the above info, what is the number of threads created on the >>>>>> broker >>>>>> side for sending and dispatching. Will the send and dispatch be >>>>>> synchronous by default for the above? >>>>>> >>>>>> If I make the connection URI to be as follows >>>>>> >>>>>> tcp://:61616?jms.useAsyncSend=true&jms.dispatchAsync=true >>>>>> >>>>>> will this cause the send and dispatch to be asynchronous? >>>>>> >>>>>> We are having some porblem with producer bloacking on >>>>>> ActiveMQSession.send() with our current set up and I would like to >>>>>> really >>>>>> understand what's happening to be able to resolve this. >>>>>> >>>>>> thank you! >>>>>> jaya >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > http://www.nabble.com/file/p17221085/thread_dump.txt thread_dump.txt >