Sébastien Gérard [
http://community.jboss.org/people/sebge2] created the discussion
"Infinite Redelivery"
To view the discussion, visit:
http://community.jboss.org/message/539624#539624
--------------------------------------------------------------
Hello !
I'm here because of a redelivery problem. I've tryed on Jboss 4.2.0 ou 4.2.3 with
Spring 2.5.6. Unfortunately, Jboss seems to not handle correctly the RedeliveryLimit
attribute. Thanks to JMX, I can see that the RedeliveryLimit for my configured queue is
set to -1 (i.e., no limit). Even if I set that attribute to 3, the behaviour is the same:
my listener continuously receives the message (on message is called again & again) and
throws a runtime exception every time it receives the message. The message is never placed
in the DLQ. Changing the redelivering delay,rightly delays the reception of my messages.
Here is the configuration of my queue:
My spring message listener:
Here is my listenener:
public void onMessage(Message message) {
boolean isSuccessfullyReceived = false;
try {
if ( throwingPolicy != null )
{
throwingPolicy.throwExceptionIfRequired(message, this);
}
isSuccessfullyReceived = true;
} finally {
final String messageId =
messageIdentifierService.getMessageIdentifier(message);
if (isSuccessfullyReceived) {
logger.debug("Message [" + message + "] has been
successfully received.");
onCompleted(messageId, message);
} else {
logger.debug("Message [" + message + "] has NOT been
successfully received.");
onException(messageId, message);
}
}
}
Any idea ?
Thanks for your help :) !
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/539624#539624]
Start a new discussion in JBoss Messaging at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]