You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Marco Crivellaro (JIRA)" <ji...@apache.org> on 2010/01/14 11:14:43 UTC
[jira] Created: (CAMEL-2360) recipientList retryUntil not working
recipientList retryUntil not working
------------------------------------
Key: CAMEL-2360
URL: https://issues.apache.org/activemq/browse/CAMEL-2360
Project: Apache Camel
Issue Type: Bug
Affects Versions: 2.2.0
Reporter: Marco Crivellaro
Priority: Critical
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:
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");
bean is registered in such way:
JndiRegistry jndi = new JndiRegistry(new JndiContext());
jndi.bind("myRetryBean", new RetryBean());
bean class is:
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;
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-2360) recipientList retryUntil not working
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-2360:
-------------------------------
Description:
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}
was:
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:
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");
bean is registered in such way:
JndiRegistry jndi = new JndiRegistry(new JndiContext());
jndi.bind("myRetryBean", new RetryBean());
bean class is:
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;
}
> recipientList retryUntil not working
> ------------------------------------
>
> Key: CAMEL-2360
> URL: https://issues.apache.org/activemq/browse/CAMEL-2360
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.2.0
> Reporter: Marco Crivellaro
> Assignee: Claus Ibsen
>
> 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.
[jira] Work started: (CAMEL-2360) recipientList retryUntil not
working
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on CAMEL-2360 started by Claus Ibsen.
> 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
>
> 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.
[jira] Commented: (CAMEL-2360) recipientList retryUntil not working
Posted by "Marco Crivellaro (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56932#action_56932 ]
Marco Crivellaro commented on CAMEL-2360:
-----------------------------------------
I am not able to compile latest trunk my systems runs out of memory...
> 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
>
> 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.
[jira] Updated: (CAMEL-2360) recipientList retryUntil not working
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-2360:
-------------------------------
Fix Version/s: (was: 2.2.0)
2.3.0
Okay for a timing issue when using {{parallel}} recipient list.
I will commit a fix for that in 2.3 later today
> 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.
[jira] Updated: (CAMEL-2360) recipientList retryUntil not working
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-2360:
-------------------------------
Priority: Major (was: Critical)
> recipientList retryUntil not working
> ------------------------------------
>
> Key: CAMEL-2360
> URL: https://issues.apache.org/activemq/browse/CAMEL-2360
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.2.0
> Reporter: Marco Crivellaro
> Assignee: Claus Ibsen
>
> 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:
> 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");
> bean is registered in such way:
> JndiRegistry jndi = new JndiRegistry(new JndiContext());
> jndi.bind("myRetryBean", new RetryBean());
> bean class is:
> 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;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CAMEL-2360) recipientList retryUntil not working
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-2360.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.2.0
Should work in 2.2 release
> 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.2.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.
[jira] Updated: (CAMEL-2360) recipientList retryUntil not working
Posted by "Marco Crivellaro (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marco Crivellaro updated CAMEL-2360:
------------------------------------
Attachment: Recipientlist-Retryuntil.zip
Attached a sample file which shows retryUntil method of RetryBean is never called.
> 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
> 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.
[jira] Commented: (CAMEL-2360) recipientList retryUntil not working
Posted by "Marco Crivellaro (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56924#action_56924 ]
Marco Crivellaro commented on CAMEL-2360:
-----------------------------------------
I am using FTP endpoints
> recipientList retryUntil not working
> ------------------------------------
>
> Key: CAMEL-2360
> URL: https://issues.apache.org/activemq/browse/CAMEL-2360
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.2.0
> Reporter: Marco Crivellaro
> Assignee: Claus Ibsen
>
> 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.
[jira] Commented: (CAMEL-2360) recipientList retryUntil not working
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56928#action_56928 ]
Claus Ibsen commented on CAMEL-2360:
------------------------------------
Okay found an issue but that is related to when using more routes.
Do you also have Camel routes for those FTP endpoints? eg do you have also {{from("ftp:...")}} in a Camel route somewhere?
> recipientList retryUntil not working
> ------------------------------------
>
> Key: CAMEL-2360
> URL: https://issues.apache.org/activemq/browse/CAMEL-2360
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.2.0
> Reporter: Marco Crivellaro
> Assignee: Claus Ibsen
>
> 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.
[jira] Commented: (CAMEL-2360) recipientList retryUntil not working
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56923#action_56923 ]
Claus Ibsen commented on CAMEL-2360:
------------------------------------
Can you post which endpoints you use in the recipientListHeader and if its to another Camel route can you post these also.
> recipientList retryUntil not working
> ------------------------------------
>
> Key: CAMEL-2360
> URL: https://issues.apache.org/activemq/browse/CAMEL-2360
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.2.0
> Reporter: Marco Crivellaro
> Assignee: Claus Ibsen
>
> 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.
[jira] Commented: (CAMEL-2360) recipientList retryUntil not working
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56936#action_56936 ]
Claus Ibsen commented on CAMEL-2360:
------------------------------------
Create a small project which does not work at your end and attach it as a zip file.
> 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
>
> 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.
[jira] Commented: (CAMEL-2360) recipientList retryUntil not working
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Commented: (CAMEL-2360) recipientList retryUntil not working
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57468#action_57468 ]
Claus Ibsen commented on CAMEL-2360:
------------------------------------
Marco you are welcome to try with latest code from trunk on your system.
> 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.
[jira] Updated: (CAMEL-2360) recipientList retryUntil not working
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-2360:
-------------------------------
Component/s: camel-core
> 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
>
> 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.
[jira] Commented: (CAMEL-2360) recipientList retryUntil not working
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56929#action_56929 ]
Claus Ibsen commented on CAMEL-2360:
------------------------------------
Marco can you try with latest code from trunk?
I have committed a fix.
trunk: 899628.
> recipientList retryUntil not working
> ------------------------------------
>
> Key: CAMEL-2360
> URL: https://issues.apache.org/activemq/browse/CAMEL-2360
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.2.0
> Reporter: Marco Crivellaro
> Assignee: Claus Ibsen
>
> 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.
[jira] Assigned: (CAMEL-2360) recipientList retryUntil not working
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-2360:
----------------------------------
Assignee: Claus Ibsen
> recipientList retryUntil not working
> ------------------------------------
>
> Key: CAMEL-2360
> URL: https://issues.apache.org/activemq/browse/CAMEL-2360
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.2.0
> Reporter: Marco Crivellaro
> Assignee: Claus Ibsen
> Priority: Critical
>
> 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:
> 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");
> bean is registered in such way:
> JndiRegistry jndi = new JndiRegistry(new JndiContext());
> jndi.bind("myRetryBean", new RetryBean());
> bean class is:
> 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;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2360) recipientList retryUntil not working
Posted by "Marco Crivellaro (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56935#action_56935 ]
Marco Crivellaro commented on CAMEL-2360:
-----------------------------------------
I don't see it working even by using a Context scoped error handler
> 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
>
> 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.
[jira] Commented: (CAMEL-2360) recipientList retryUntil not working
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56921#action_56921 ]
Claus Ibsen commented on CAMEL-2360:
------------------------------------
Context scoped error handling works
{code}
onException(Exception.class).retryUntil(bean("myRetryBean")).end();
from("seda:start")
.recipientList(header("recipientListHeader"))
.to("mock:result");
from("direct:foo").to("log:foo").to("mock:foo");
{code}
> recipientList retryUntil not working
> ------------------------------------
>
> Key: CAMEL-2360
> URL: https://issues.apache.org/activemq/browse/CAMEL-2360
> Project: Apache Camel
> Issue Type: Bug
> Affects Versions: 2.2.0
> Reporter: Marco Crivellaro
> Assignee: Claus Ibsen
> Priority: Critical
>
> 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:
> 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");
> bean is registered in such way:
> JndiRegistry jndi = new JndiRegistry(new JndiContext());
> jndi.bind("myRetryBean", new RetryBean());
> bean class is:
> 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;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2360) recipientList retryUntil not working
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56933#action_56933 ]
Claus Ibsen commented on CAMEL-2360:
------------------------------------
See this link how to increase memory to maven
http://camel.apache.org/building.html
> 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
>
> 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.