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 6768417CA5 for ; Tue, 9 Jun 2015 13:29:53 +0000 (UTC) Received: (qmail 99360 invoked by uid 500); 9 Jun 2015 13:29:53 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 99320 invoked by uid 500); 9 Jun 2015 13:29:53 -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 99308 invoked by uid 99); 9 Jun 2015 13:29:52 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jun 2015 13:29:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 510BEC095F for ; Tue, 9 Jun 2015 13:29:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.251 X-Spam-Level: *** X-Spam-Status: No, score=3.251 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id dhAXmcRrGrPb for ; Tue, 9 Jun 2015 13:29:42 +0000 (UTC) Received: from mail-ig0-f173.google.com (mail-ig0-f173.google.com [209.85.213.173]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 4252743ACE for ; Tue, 9 Jun 2015 13:29:42 +0000 (UTC) Received: by igbzc4 with SMTP id zc4so11981668igb.0 for ; Tue, 09 Jun 2015 06:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=jVEE0/wJg0POScccPqa5Ir8PgXhNqOcnrqzaVjPRzqg=; b=MJthg8VN+3b/Oe09oBQtWJpUF8SVKTAwhIMA3jxoNO7Fjkz7SACWIGYOhM/DT70upV zzPrRlOZIDT3zl1QYFnG7iXve4DvrLAKw/gFfOyczVMP8BEUxnj0KKfuw7kE0qD1b8Gd pbtg9nug1UHRkiMU6TiEHy9EAM3AayFzhlyOhNzijwS8Q6OagfDrFad6wo3/ClVFso1X BnUI6ut9yjZkXcqzf3/eKwV0u5HDiM826o960QjfMGnVgOkwxDZNIqO0HZ88qiQLkhuQ ay+fUhlA3k1MbNKUw6aNXxT0AsPxxLGLvHXdntfHvqs30iF6oD5ds4+EKCoF2Oy/eYLM urZA== X-Received: by 10.107.155.74 with SMTP id d71mr26842304ioe.29.1433856576696; Tue, 09 Jun 2015 06:29:36 -0700 (PDT) MIME-Version: 1.0 Sender: tbain98@gmail.com Received: by 10.50.251.141 with HTTP; Tue, 9 Jun 2015 06:29:16 -0700 (PDT) In-Reply-To: References: From: Tim Bain Date: Tue, 9 Jun 2015 07:29:16 -0600 X-Google-Sender-Auth: 4Ra2AHuXoIh1yBx6JjnEwJcgiG0 Message-ID: Subject: Re: Allowing another consumer to have a message (ActiveMQ-CPP) To: ActiveMQ Users Content-Type: multipart/alternative; boundary=001a1140eadae9b822051815bf76 --001a1140eadae9b822051815bf76 Content-Type: text/plain; charset=UTF-8 So why can't you use transactions? Won't you get what you want if you commit the transaction after every successful message and rollback()/close() and then reconnect after every failed one? Also is the app server going to fail to respond to *certain* messages, or is it going to fail to respond to *any* messages? If the latter, you can delay the reconnect till you figure out that the web service is available again. On Tue, Jun 9, 2015 at 7:09 AM, spamtrap < nospam.1.friedbadger@spamgourmet.com> wrote: > On Tue, 9 Jun 2015 06:43:45 -0600, Tim Bain > wrote: > > The situation is that the consumer gets a message from a queue and > then converts into into a different format and sends it to an > application server, which should respond with an acknowledgement > message. If the application server does not respond to a particular > message then we want to be able to allow another ActiveMQ consumer to > pick up the message and send it elsewhere. Any consumer should be > able to process the message so we don't want to use selectors. > > >In this scenario, do you want to consume it twice, or do you really want > to > >consume it once but you're picking which consumer gets it? If the latter, > >can you use selectors to make sure the right consumer gets the right > >messages? Or maybe an embedded Camel route to send those messages to a > >queue that's specific to the consumer that should get them? > >On Jun 9, 2015 6:00 AM, "spamtrap" > >wrote: > > > >> On Tue, 9 Jun 2015 07:24:24 -0400, Christopher Shannon > >> wrote: > >> > >> >The use case you are trying to achieve is probably best done by using a > >> >transaction instead of individual acknowledgements. If you call > rollback > >> >on the session then the message would be available to be redelivered to > >> >another consumer. > >> > >> I don't think I can use a transaction because all messages are > >> committed at once. We need to be able to select which messages may be > >> redelivered and which not, hence the individual acknowledge mode is > >> used. > >> > >> Will the rollback work with individual acknowledgements? > >> > >> > >> > > >> >On Tue, Jun 9, 2015 at 3:50 AM, spamtrap < > >> >nospam.1.friedbadger@spamgourmet.com> wrote: > >> > > >> >> Hi, > >> >> > >> >> In some cases we want to allow another consumer to consumer a message > >> >> that has already been consumed. The session is opened using > >> >> INDIVIDUAL_ACKNOWLEDGE and the message has not been acknowledged. I > >> >> have tried closing the session where the message has been consumed > but > >> >> the message is not available to the other consumer. How can I > achieve > >> >> what I need? > >> >> > >> >> TIA. > >> >> > >> >> > >> >> > >> > >> > >> > > > --001a1140eadae9b822051815bf76--