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 702AE10E07 for ; Mon, 3 Mar 2014 05:42:59 +0000 (UTC) Received: (qmail 11117 invoked by uid 500); 3 Mar 2014 05:42:58 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 10449 invoked by uid 500); 3 Mar 2014 05:42:57 -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 10441 invoked by uid 99); 3 Mar 2014 05:42:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2014 05:42:56 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of fancyerii@gmail.com designates 209.85.217.171 as permitted sender) Received: from [209.85.217.171] (HELO mail-lb0-f171.google.com) (209.85.217.171) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2014 05:42:50 +0000 Received: by mail-lb0-f171.google.com with SMTP id w7so4265564lbi.2 for ; Sun, 02 Mar 2014 21:42:29 -0800 (PST) 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=QxuDSECuOaYYUMjyB2pvQE5+d/0edeWW9QECAQ45X+E=; b=PThHK38/X1ucW9JJxGUqtJDsycMIJFQ6XJ0gGuZo7kcYWK6rUB0IQXDCdwlFB+1BEd z3v5mefNmYAb2/2rfzIYxbKLA+XZWJG6/9b55sraw+XGC3EH8qMmv3cE5sep7uTGs8QK +hyewsoIbIp9OKp/TyLUpptxiGpSjU3+j5+8JkP21zaa4YYFOK/JVTiqqWFuDGlPJGLe X1F/QdYgvLmzIiJZCNQU8mJ7tpCV4d86v7Y3nYTUATjja9XbfUg0eE2z2FcbDy+ooUE3 04m1N8kTuFrMRxfjFwMrqV4PmjU57t/KlEVdvSn538eWEwp67eS1cDDnScmh1N/hdKns NowA== MIME-Version: 1.0 X-Received: by 10.152.43.197 with SMTP id y5mr579734lal.25.1393825349205; Sun, 02 Mar 2014 21:42:29 -0800 (PST) Received: by 10.112.158.170 with HTTP; Sun, 2 Mar 2014 21:42:29 -0800 (PST) In-Reply-To: References: Date: Mon, 3 Mar 2014 13:42:29 +0800 Message-ID: Subject: Re: can a client "refuse" a message? From: Li Li To: users@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org I have tested it with auto_acknowledge mode. it will be redediveryed to the same consumer again and again before be moved to dead letter queue. what I want is, this message be sent to other consumers On Mon, Mar 3, 2014 at 1:13 PM, Noel OConnor wrote: > If the mdb is in a transaction you could try rolling it back. If not (I > think) the message should be redelivered if you throw a runtime exception > from within the MDB. > > > On Mon, Mar 3, 2014 at 3:35 PM, Li Li wrote: > >> hi all, >> can a queue message consumer "refuse" a message after receive a >> message? >> because a client don't know the message in advance. >> onMessage(Message msg){ >> if(CannotProcess(msg)){ >> //refuse this message >> } >> } >> what I need is: if the message can't be processed by one client, it >> can be sent to another consumer. >> if all consumer "refuse" this message, then this message will be >> removed to dead letter queue or to the end of the queue. >>