You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2017/03/30 16:00:09 UTC

qpid-jms git commit: QPIDJMS-278 Fast path to handle the Accepted outcome

Repository: qpid-jms
Updated Branches:
  refs/heads/master aa862d30e -> 4e8542455


QPIDJMS-278 Fast path to handle the Accepted outcome

Deal with Accepted quickly to optimize time spent in the provider thread
on delivery updates. 

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

Branch: refs/heads/master
Commit: 4e8542455a14f7302a6952c1183349e050ac2f0c
Parents: aa862d3
Author: Timothy Bish <ta...@gmail.com>
Authored: Thu Mar 30 11:59:50 2017 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Thu Mar 30 11:59:50 2017 -0400

----------------------------------------------------------------------
 .../org/apache/qpid/jms/provider/amqp/AmqpFixedProducer.java | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/4e854245/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpFixedProducer.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpFixedProducer.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpFixedProducer.java
index 73ee264..f654d48 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpFixedProducer.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpFixedProducer.java
@@ -210,6 +210,14 @@ public class AmqpFixedProducer extends AmqpProducer {
         if (state != null) {
 
             InFlightSend send = (InFlightSend) delivery.getContext();
+
+            if (state instanceof Accepted) {
+                LOG.trace("Outcome of delivery was accepted: {}", delivery);
+                send.onSuccess();
+                super.processDeliveryUpdates(provider, delivery);
+                return;
+            }
+
             Exception deliveryError = null;
             Outcome outcome = null;
 


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