Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 13582 invoked from network); 16 Aug 2006 07:20:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Aug 2006 07:20:30 -0000 Received: (qmail 91484 invoked by uid 500); 16 Aug 2006 07:20:30 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 91466 invoked by uid 500); 16 Aug 2006 07:20:30 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 91457 invoked by uid 99); 16 Aug 2006 07:20:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Aug 2006 00:20:30 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of james.strachan@gmail.com designates 64.233.182.186 as permitted sender) Received: from [64.233.182.186] (HELO nf-out-0910.google.com) (64.233.182.186) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Aug 2006 00:20:29 -0700 Received: by nf-out-0910.google.com with SMTP id c29so621758nfb for ; Wed, 16 Aug 2006 00:20:08 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Ka25URNlHNu05uEvQUl9OmFd4NYwoIq1bis8Irm5lqbkH+BBgdG/tTEynckSSfT1ze/ZWkg1kiY4R4i/uETtJP6Rd1YaWpiYwGULKYJxv07S1lEVBUkTmQmJqWJ7ANJmHhrRRX9vnXpwqQOpsDQcE4rlthYwr1ktWNsAfZ8xsrI= Received: by 10.49.29.3 with SMTP id g3mr332556nfj; Wed, 16 Aug 2006 00:20:08 -0700 (PDT) Received: by 10.78.173.20 with HTTP; Wed, 16 Aug 2006 00:20:07 -0700 (PDT) Message-ID: Date: Wed, 16 Aug 2006 08:20:07 +0100 From: "James Strachan" To: activemq-users@geronimo.apache.org Subject: Re: ActiveMQ behavior when subscriber crashes? In-Reply-To: <5824427.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5824427.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 8/16/06, B-Storm wrote: > > I am a newby at using ActiveMQ and therefore I have simple > questions. Welcome! :) > Maybe I missed a similar post in the forum? > > In the situation where I have a publish - subscibe model... suppose > I have multiple subscribers consumming the messages. The > subscriptions are not durable and the messages are not persistent. > Then one of my subscribers crashes without properly closing the > session/connection etc. When a subscriber crashes unexpectedly I don't want > ActiveMQ to try to send anymore message to them. I assume it will > generate an exception of some sort within the broker. Yes. > 1. What is the behavior of ActiveMQ going to be in this situation? The broker will kill the connection and not dispatch (or keep around) any more messages for that consumer > 2. For all of the message received from the publisher(s) how often > will it attempt to send new messages to the crashed subscriber > before giving up on it? Once it decides the connection is dead it stops doing anything for that client any more. Typically it stops a connection when the socket dies. There's also an inactivity timeout applied above the TCP layer in case your OS doesn't inform Java of sockets terminating fast enough. You can tweak the socket timeouts etc via the TCP transport... http://activemq.org/site/tcp-transport-reference.html or specify an inactivity timeout via the wireformat... http://activemq.org/site/configuring-wire-formats.html BTW the parent page of those links is a handy place to start on as its got lots of information on how you can configure ActiveMQ using a simple URI syntax... http://activemq.org/site/configuring-transports.html > 3. Will this affect the future performance of ActiveMQ's message > delivery to the other subscribers? No. As soon as the connection is closed by the broker its resources are all discarded. The only real way a subscriber can adversely affect the broker is by working perfectly but by going very slow compared to the other subscribers... http://activemq.org/site/slow-consumer-handling.html > 4. Is there a way to configure ActiveMQ to stop sending messages > to crashed clients and close the connection after a certain number > of failed attempts (non-durable, non-persistent)? As soon as connection is closed, the broker disconnects the client. The client can auto-reconnect if it uses the failover transport... http://activemq.org/site/failover-transport-reference.html > 5. Is there a way to be notified of subscribers that are not accepting > messages? You can use JMX to watch the system http://activemq.org/site/jmx.html or you can use advisories http://activemq.org/site/advisory-message.html -- James ------- http://radio.weblogs.com/0112098/