activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQ-1152) ActiveMQ connectionFactory ignores redeliveryPolicy
Date Wed, 23 May 2007 16:33:34 GMT

    [ https://issues.apache.org/activemq/browse/AMQ-1152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39141
] 

Guillaume Nodet commented on AMQ-1152:
--------------------------------------

Following is a diff of a small bug found while debugging this issue:

Index: src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
===================================================================
--- src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java      (revision 540956)
+++ src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java      (working copy)
@@ -598,7 +598,9 @@
             if ((session.isTransacted() || session.isDupsOkAcknowledge())) {
                 acknowledge();
             }
-            deliveredMessages.clear();
+            if (!session.isTransacted()) {
+                deliveredMessages.clear();
+            }
             unconsumedMessages.close();
             this.session.removeConsumer(this);
         }


Unfortunately, the problem is that spring creates a consumer each time it wait for a jms message
and the redelivery policy is handled on a per consumer basis.  So when the consumer is closed,
the transient data about redelivery is lost.   And when the consumer is closed, the broker
re-dispatch the message immediately.

> ActiveMQ connectionFactory ignores redeliveryPolicy
> ---------------------------------------------------
>
>                 Key: AMQ-1152
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1152
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 4.1.0
>            Reporter: Tim Chen
>         Attachments: jms.tar.bz2
>
>
> Run mvn -Dtest=JmsTest test in the attached sample application.
> Redelivery is ignored and failed messages will not stop redelivering.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message