Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 31105 invoked from network); 5 Aug 2010 07:53:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Aug 2010 07:53:26 -0000 Received: (qmail 10279 invoked by uid 500); 5 Aug 2010 07:53:26 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 10029 invoked by uid 500); 5 Aug 2010 07:53:24 -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 10021 invoked by uid 99); 5 Aug 2010 07:53:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Aug 2010 07:53:23 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_HELO_PASS,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Aug 2010 07:53:17 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1OgvG5-0005HX-Lk for users@activemq.apache.org; Thu, 05 Aug 2010 00:52:57 -0700 Message-ID: <29354445.post@talk.nabble.com> Date: Thu, 5 Aug 2010 00:52:57 -0700 (PDT) From: Iblis To: users@activemq.apache.org Subject: Manually triggering message recovery / process messages only if the producer is online MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: philipp@rough-sea.com Hi! I'm using ActiveMQ 5.3.2 together with Camel 2.1.0 and have a producer and a consumer communicating trough a queue, using an embedded broker. I have activated persistence, so that messages don't get lost if producer or consumer are in an error state. My application layer on the consumer-side can only process the consumed messages if the producer of said messages is online / connected to the broker. Therefore, I use INDIVIDUAL ACKNOWLEDGE, so that the message only gets acknowledged if the application layer was able to process it. If the application layer was not able to process it, the message stays in the persitence store and does only get redelivered after a restart of the consumer application. The problem: During the recovery-phase, the producer ist not yet connected, so the messages won't get processed again, and stay in the persitence store forever. >From my current point of view, I only see two options: - Trigger the recovery again if the producer got connected (e.g. through listening to the advisory channel) - check if the dispatched message came from the persitence store, and cache it in a map until a producer is available Having a look at the ActiveMQ-API, I found no way of doing any of those options. I know that I am able to call recover on an ActiveMQSession, but I have no access to the session when I use camel. Is there any way to call the recovery manually, or, find out if a message came from the persitence store? Thanks and regards, Philipp -- View this message in context: http://old.nabble.com/Manually-triggering-message-recovery---process-messages-only-if-the-producer-is-online-tp29354445p29354445.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.