Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B2DF090A8 for ; Tue, 2 Oct 2012 15:32:19 +0000 (UTC) Received: (qmail 48407 invoked by uid 500); 2 Oct 2012 15:32:19 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 48370 invoked by uid 500); 2 Oct 2012 15:32:19 -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 48361 invoked by uid 99); 2 Oct 2012 15:32:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Oct 2012 15:32:19 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gary.tully@gmail.com designates 209.85.212.179 as permitted sender) Received: from [209.85.212.179] (HELO mail-wi0-f179.google.com) (209.85.212.179) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Oct 2012 15:32:13 +0000 Received: by wibhq7 with SMTP id hq7so836294wib.14 for ; Tue, 02 Oct 2012 08:31:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=T7bwqgK2My8h8pesGg9UJSwZkDtL8Y8fjq2KALnY3EE=; b=SxrqN8lL0YBt1cF1PHdlAlAdDOqIaF/tkkKe4+H4L/zPgQ5hLnZ10ogju2GtUILqon +6V4Cz9AmqZyjjnnYfGTFWb9eUeVTveaiUlfVwk1gZemF58R5tjV+Orjbf09AFMDdiNE ybbxsmzqGdqCU8oEPfWqMp3tz1VUGT5kM92C8I09zm5t0kd1/V1KwP4s8RFDEtTBawmX oAj6z1bvXwFXkvIjvx7EtgKV8McTd3iSKMtd+Ygqxqj2WAFx2zrd5GiMomFASF3PPfd8 lj4v+5UWeXwKWPgjxBwH3dpVLfneG2HQ2LCMjMF0PVMI+5EhJU25Rq16bl3hlIwFuFBM EPig== MIME-Version: 1.0 Received: by 10.180.91.71 with SMTP id cc7mr22764791wib.2.1349191912835; Tue, 02 Oct 2012 08:31:52 -0700 (PDT) Received: by 10.194.23.134 with HTTP; Tue, 2 Oct 2012 08:31:52 -0700 (PDT) In-Reply-To: <1349187075331-4657353.post@n4.nabble.com> References: <1349187075331-4657353.post@n4.nabble.com> Date: Tue, 2 Oct 2012 16:31:52 +0100 Message-ID: Subject: Re: Maintenance Mode From: Gary Tully To: users@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 hmm, we don't have a good story for that use case atm. But the memory limit on a destination would be one way to stop message production. Via jmx, you could reduce the memoryLimit, say to 1, on a specific queue and the next message send would block waiting for space. Via jmx it is possible see the pending/inflight counts for consumers and the queue depth of your terminating queue. To terminate a consumer via jmx, you would need to terminate/stop their connection. you can access the connection via the subscription view. For producers, stop/start on their connections is also an option, but if they use failover they will reconnect. I presume you are using non persistent messages, if not, calling broker stop will not result in any message loss. On 2 October 2012 15:11, zackhasit wrote: > Hi, > I want to bring down consumers connected to a specific queue for > maintenance via following steps: > > 1. Block a particular queue from receiving more messages from producers. > (How ?) > 2. Check via Console / programatically that all pending messages have been > processed by consumers. > 3. Now stop the consumers. > > How can I do #1 programatically ? I cant change activemq.xml since that > would require reboot. How to best achieve the above scenario. > > Thanks > > > > -- > View this message in context: http://activemq.2283324.n4.nabble.com/Maintenance-Mode-tp4657353.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- http://redhat.com http://blog.garytully.com