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 CE7FD18896 for ; Tue, 8 Dec 2015 21:59:40 +0000 (UTC) Received: (qmail 56305 invoked by uid 500); 8 Dec 2015 21:59:37 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 56258 invoked by uid 500); 8 Dec 2015 21:59:37 -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 56246 invoked by uid 99); 8 Dec 2015 21:59:37 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Dec 2015 21:59:37 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id A3D6F1A0D24 for ; Tue, 8 Dec 2015 21:59:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.15 X-Spam-Level: * X-Spam-Status: No, score=1.15 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, KAM_LIVE=1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id bgvxZVxz2Cl8 for ; Tue, 8 Dec 2015 21:59:29 +0000 (UTC) Received: from mail-qg0-f47.google.com (mail-qg0-f47.google.com [209.85.192.47]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id BC3C024C66 for ; Tue, 8 Dec 2015 21:59:28 +0000 (UTC) Received: by qgec40 with SMTP id c40so39361528qge.2 for ; Tue, 08 Dec 2015 13:59:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=k5ld7I0x34OFGzc5NNq4OtkbZ7yZVSAZUfX2VcrIRtc=; b=ACamUZ1ipotenE499lRGfcobHr1mBIoj4RFJ0lcKFmilvzXDRDzGrW7cOWIe0LsS6P sGp0XcngELHNIzPGB9KFK/y6Uasw1M2h+KkmIT0DNbHljHs7OKb9G3Dx0LTCNGvHV2Z9 3X35930RoAs+/oHFY8J3WFYGJ6YkyGCBXvg8SQ5gNhDThPH4CH2NULv/yXrx3NqB6pr8 DlBePTiHJw6cB3SA1NThM/4l2mtAqif8ZdE/RdpxdByNbTfLjJjyVNUWlEIEUQW/AMbU sVkFJ1sbJaVLu1jYmRGArIxtEZv0AbUvyJHQSFGHu/RLqpAEm+b5EZZ8DUN53YwJAWg1 YJeQ== X-Received: by 10.140.28.98 with SMTP id 89mr2754591qgy.40.1449611967802; Tue, 08 Dec 2015 13:59:27 -0800 (PST) Received: from [192.168.2.150] (c-73-191-41-186.hsd1.va.comcast.net. [73.191.41.186]) by smtp.googlemail.com with ESMTPSA id p4sm2383074qhp.45.2015.12.08.13.59.25 for (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Dec 2015 13:59:27 -0800 (PST) Subject: Re: How to use INDIVIDUAL_ACKNOWLEDGE mode? To: users@activemq.apache.org References: From: Timothy Bish Message-ID: <566752BD.10903@gmail.com> Date: Tue, 8 Dec 2015 16:59:25 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 12/08/2015 04:44 PM, Camilo Rostoker wrote: > Hi all, > > I'm trying to understand how to use the INDIVIDUAL_ACKNOWLEDGE mode > properly. > > What I am trying to do is this: > > 1. Message Producer sends messages to a queue > 2. Message Consumer receives individual message and confirms successful > processing of each individual message. > 3. If Message Consumer cannot successfully process the message, then it > should be re-delivered automatically according to the re-delivery policy. > > > My question is this: How is the _unsuccessful_ processing of a message > communicated to the ActiveMQ broker? The only way I've been able to do > this is to explicitly throw some kind of RuntimeException, but this seems > hacky. Throwing is one option, otherwise closing the consumer will cause all unack'd messages to be redelivered to another consumer. > > I have almost been able to get this working using the transactional queue > approach, to explicitly commit or rollback an individual message, but this > then causes the message redelivery mechanism to re-send messages using > incorrect schedule. > > Any help is greatly appreciated. > > Thanks! > Cam > -- Tim Bish Sr Software Engineer | RedHat Inc. tim.bish@redhat.com | www.redhat.com twitter: @tabish121 blog: http://timbish.blogspot.com/