Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 79063 invoked from network); 12 Apr 2008 12:34:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Apr 2008 12:34:32 -0000 Received: (qmail 96372 invoked by uid 500); 12 Apr 2008 12:34:32 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 96349 invoked by uid 500); 12 Apr 2008 12:34:32 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 96340 invoked by uid 99); 12 Apr 2008 12:34:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Apr 2008 05:34:31 -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: domain of rajdavies@gmail.com designates 72.14.220.156 as permitted sender) Received: from [72.14.220.156] (HELO fg-out-1718.google.com) (72.14.220.156) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Apr 2008 12:33:48 +0000 Received: by fg-out-1718.google.com with SMTP id l27so713031fgb.44 for ; Sat, 12 Apr 2008 05:33:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=uKDgkXocrg0CM0lYRv8HCqGbrnFoV06VbxPOzEgWs80=; b=DW9iho8IJ9ETXTsBes6IALEmsctCFBjiwgwqJeWCqRAjAtv0L93BCdpVssv0ILv3OxW/GopbVr6X5WfAbx2d/QvWa1Nzs7Loexzf8GgH6xjycIoqiQ71yFZUbduLcYgZ872VjR9DavCQirSpaQKk7vcS5qW5roNIm/fSSMkWM5I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=QqskRB8P7ItxkraGPXyys71Op5YXPVz2kAETYyIMMeRBp6yHt8o+rvPZ4cfGe9gZ9dLQtEu08FOL/PBslQ0BMPWsv/G8+Z3PINO4vhJPEFu35jPxVC9Ipp2/SxtEmq2iZvW36ITb4XcKDrYpAy0B2MYCsz7EFxTup9x17GSk4bI= Received: by 10.82.136.8 with SMTP id j8mr2046686bud.45.1208003639335; Sat, 12 Apr 2008 05:33:59 -0700 (PDT) Received: from ?192.168.1.82? ( [81.132.69.253]) by mx.google.com with ESMTPS id f4sm10163618nfh.26.2008.04.12.05.33.56 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Apr 2008 05:33:58 -0700 (PDT) Message-Id: <3E352698-BD24-4CD1-B643-D38DEFC0DB90@gmail.com> From: Rob Davies To: dev@activemq.apache.org In-Reply-To: <16643565.post@talk.nabble.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: Thread Model, and Simultaneous Connections Scalability Date: Sat, 12 Apr 2008 13:33:54 +0100 References: <16643565.post@talk.nabble.com> X-Mailer: Apple Mail (2.919.2) X-Virus-Checked: Checked by ClamAV on apache.org On 12 Apr 2008, at 02:18, mqperson wrote: > > In the web server world, most web servers fire off a new thread to > process a > request, but a few, such as Jetty, for scalability, separate the > couple of > requests and threads. > > I need to know what does ActiveMQ do in this regard? If a consumer is > connected listening on a queue, does it have a dedicated thread? If > so, > that seems like there would be something like one thread per > subscriber. > Which would limit the number of simultaneous subscribers to perhaps > a few > hundreds. > > On the other hand, if ActiveMQ has a modest number of threads > servicing a > LARGE number of open network connections (sockets / file > descriptors) -- > then it could easily scale to thousands of simultaneous subscribers > if not > more. > > I feel like the nature of ActiveMQ would imply the latter. However, > my > brief search of ActiveMQ documentation did not yield a confirmation. > > Could somebody please enlighten me or point me to a document? > Thanks in > advance. > -- > View this message in context: http://www.nabble.com/Thread-Model%2C-and-Simultaneous-Connections-Scalability-tp16643565s2354p16643565.html > Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. > There's a a good article here: http://open.iona.com/wiki/display/ProdInfo/Understanding+the+Threads+Allocated+in+ActiveMQ The number of threads is dependent on the default blocking i/o mode of the message broker - one thread per socket (equivalent to one per connection). the use of nio is an option - and performs very well too. The choice you make is often down to the usage scenario and environment cheers, Rob http://open.iona.com/ -Enterprise Open Integration http://rajdavies.blogspot.com/