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:31:34 GMT

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

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

The problem with spring jms support for consuming messages is that it each time a message
is consumed, a new jms consumer is created.  And the redelivery policy is handled on the consumer
side, not on the broker side.  Hence, the broker redispatch the message immediately.

Here is a diff to fix a small bug on 4.1.1 found while debugging this issue, but as explained
above, the problem lies elsewhere.

{code}
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);
         }
{code}

> 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