qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject qpid-jms git commit: remove extraneous 'postCommit/postRollback' settlement handling, we now settle consumed messages at the point they are transactionally accepted rather than storing them as 'delivered'
Date Wed, 03 Dec 2014 16:03:44 GMT
Repository: qpid-jms
Updated Branches:
  refs/heads/master 40ad9e8b3 -> 33893e8f3


remove extraneous 'postCommit/postRollback' settlement handling, we now settle consumed messages
at the point they are transactionally accepted rather than storing them as 'delivered'


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/33893e8f
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/33893e8f
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/33893e8f

Branch: refs/heads/master
Commit: 33893e8f318ac6003bbed6d702ceadda6d73eac8
Parents: 40ad9e8
Author: Robert Gemmell <robbie@apache.org>
Authored: Wed Dec 3 15:55:16 2014 +0000
Committer: Robert Gemmell <robbie@apache.org>
Committed: Wed Dec 3 15:55:16 2014 +0000

----------------------------------------------------------------------
 .../qpid/jms/provider/amqp/AmqpConsumer.java    | 23 +-------------------
 1 file changed, 1 insertion(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/33893e8f/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java
index c41f5fc..01aa6e2 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java
@@ -247,13 +247,7 @@ public class AmqpConsumer extends AmqpAbstractResource<JmsConsumerInfo,
Receiver
                 }
             }
         } else if (ackType.equals(ACK_TYPE.REDELIVERED)) {
-            //TODO: Trace usage of this.
-            //TODO: Don't bother doing anything if it is [remotely]Settled already.
-            Modified disposition = new Modified();
-            disposition.setUndeliverableHere(false);
-            disposition.setDeliveryFailed(true);
-            delivery.disposition(disposition);
-            delivery.settle();
+            //TODO: remove ack type?
         } else if (ackType.equals(ACK_TYPE.POISONED)) {
             deliveryFailed(delivery, false);
         } else {
@@ -462,29 +456,14 @@ public class AmqpConsumer extends AmqpAbstractResource<JmsConsumerInfo,
Receiver
     }
 
     /**
-     * Ensures that all delivered messages are marked as settled locally before the TX state
-     * is cleared and the next TX started.
-     *
      * @throws Exception if an error occurs while performing this action.
      */
     public void postCommit() throws Exception {
-        for (Delivery delivery : delivered.values()) {
-            delivery.settle();
-        }
-        this.delivered.clear();
     }
 
     /**
-     * Redeliver Acknowledge all previously delivered messages and clear state to prepare
for
-     * the next TX to start.
-     *
      * @throws Exception if an error occurs while performing this action.
      */
     public void postRollback() throws Exception {
-        for (Delivery delivery : delivered.values()) {
-            JmsInboundMessageDispatch envelope = (JmsInboundMessageDispatch) delivery.getContext();
-            acknowledge(envelope, ACK_TYPE.REDELIVERED);
-        }
-        this.delivered.clear();
     }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message