Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 64927 invoked from network); 9 Feb 2010 15:35:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Feb 2010 15:35:58 -0000 Received: (qmail 86371 invoked by uid 500); 9 Feb 2010 15:35:57 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 86319 invoked by uid 500); 9 Feb 2010 15:35:57 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 86309 invoked by uid 500); 9 Feb 2010 15:35:57 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 86306 invoked by uid 99); 9 Feb 2010 15:35:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2010 15:35:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2010 15:35:56 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3BE9229A0013 for ; Tue, 9 Feb 2010 07:35:36 -0800 (PST) Message-ID: <152102906.14971265729736243.JavaMail.jira@brutus.apache.org> Date: Tue, 9 Feb 2010 15:35:36 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-2360) recipientList retryUntil not working In-Reply-To: <43964204.1401263464083528.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c [ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57467#action_57467 ] Claus Ibsen commented on CAMEL-2360: ------------------------------------ trunk: 908073. > recipientList retryUntil not working > ------------------------------------ > > Key: CAMEL-2360 > URL: https://issues.apache.org/activemq/browse/CAMEL-2360 > Project: Apache Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 2.2.0 > Reporter: Marco Crivellaro > Assignee: Claus Ibsen > Fix For: 2.3.0 > > Attachments: Recipientlist-Retryuntil.zip > > > summary: > the bean gets intialized but it looks like the method retryUntil is never called, could it be an error of implementation? am I doing something wrong? > using following route: > {code} > from("jms-test:queue:queue.delivery.notification.test") > .process(processor) > .onException(Exception.class).retryUntil(bean("myRetryBean")).end() > .recipientList(header("recipientListHeader").tokenize(",")) > .parallelProcessing().executorService(customThreadPoolExecutor) > .aggregationStrategy(new RecipientAggregationStrategy()) > .to("direct:chunk.completed"); > {code} > bean is registered in such way: > {code} > JndiRegistry jndi = new JndiRegistry(new JndiContext()); > jndi.bind("myRetryBean", new RetryBean()); > {code} > bean class is: > {code} > public class RetryBean { > private int _invoked; > private Logger _logger; > > public RetryBean() { > this._logger = Logger.getLogger(RetryBean.class); > this._invoked = 0; > _logger.debug("BEAN INITIALIZED " + _invoked); > } > > // using bean binding we can bind the information from the exchange to the types we have in our method signature > public boolean retryUntil(@Header(Exchange.REDELIVERY_COUNTER) Integer counter, @Body String body, @ExchangeException Exception causedBy) { > // NOTE: counter is the redelivery attempt, will start from 1 > _invoked++; > > > _logger.debug("invoked" + _invoked); > _logger.debug("counter" + counter); > _logger.debug("result" + (counter < 2)); > > // we can of course do what ever we want to determine the result but this is a unit test so we end after 3 attempts > return counter < 7; > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.