Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-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 B5E4474CB for ; Mon, 18 Jul 2011 21:38:08 +0000 (UTC) Received: (qmail 55875 invoked by uid 500); 18 Jul 2011 21:38:08 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 55723 invoked by uid 500); 18 Jul 2011 21:38:07 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 55713 invoked by uid 99); 18 Jul 2011 21:38:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jul 2011 21:38:07 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of akarpe@fusesource.com does not designate 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jul 2011 21:38:01 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1QivVU-0003Bb-Df for users@camel.apache.org; Mon, 18 Jul 2011 14:37:40 -0700 Date: Mon, 18 Jul 2011 14:37:40 -0700 (PDT) From: Ashwin Karpe To: users@camel.apache.org Message-ID: <1311025060414-4604046.post@n5.nabble.com> In-Reply-To: <1311023043853-4601191.post@n5.nabble.com> References: <1311023043853-4601191.post@n5.nabble.com> Subject: Re: Camel JMS re-delivery on failure MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, Rollback of transactions all the way back to the Queue happens only if the ActiveMQ consumer/producer that write to the queue/topic use a Transacted session in ActiveMQ. When you create a connection factory, you need to set a Transaction Manager and a associated a Transaction against the JMS consumer. When the JMS consumer picks up the message and the session is transacted, then in case of failure to perform the route and in case of exception the message will reappear on the queue from where the consumer picked up the message... Please find a working spring sample of how to create a transactional JMS Ccomponent below https://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/AbstractTransactionTest.xml?view=co&content-type=text%2Fplain https://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/AbstractTransactionTest.xml?view=co&content-type=text%2Fplain (Note that there are 2 configurations shown) in the link above. As for then using the transactional JMS component, please find a working transactional camel route below https://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/XMLQueueToProcessorTransactionTest.xml?view=co&content-type=text%2Fplain https://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/XMLQueueToProcessorTransactionTest.xml?view=co&content-type=text%2Fplain Cheers, Ashwin... ----- --------------------------------------------------------- Ashwin Karpe Apache Camel Committer & Sr Principal Consultant FUSESource (a Progress Software Corporation subsidiary) http://fusesource.com Blog: http://opensourceknowledge.blogspot.com --------------------------------------------------------- -- View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-re-delivery-on-failure-tp4601191p4604046.html Sent from the Camel - Users mailing list archive at Nabble.com.