activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject [31/50] [abbrv] activemq-nms-openwire git commit: https://issues.apache.org/jira/browse/AMQNET-508 https://issues.apache.org/jira/browse/AMQNET-507
Date Wed, 08 Mar 2017 23:12:33 GMT
https://issues.apache.org/jira/browse/AMQNET-508
https://issues.apache.org/jira/browse/AMQNET-507

Ensure that a pull command is sent on expire, also ensure that the tinout is not updated if
set to -1 to indicate broker side timeout.  


Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/commit/009fa01f
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/tree/009fa01f
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/diff/009fa01f

Branch: refs/heads/master
Commit: 009fa01fc6a469f64a82c64317168845090e5aef
Parents: 3e9f720
Author: Timothy A. Bish <tabish@apache.org>
Authored: Wed Aug 12 23:09:24 2015 +0000
Committer: Timothy A. Bish <tabish@apache.org>
Committed: Wed Aug 12 23:09:24 2015 +0000

----------------------------------------------------------------------
 src/main/csharp/MessageConsumer.cs | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/blob/009fa01f/src/main/csharp/MessageConsumer.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/MessageConsumer.cs b/src/main/csharp/MessageConsumer.cs
index 48018f3..6f04946 100755
--- a/src/main/csharp/MessageConsumer.cs
+++ b/src/main/csharp/MessageConsumer.cs
@@ -1058,6 +1058,8 @@ namespace Apache.NMS.ActiveMQ
                             timeout = deadline - dispatchTime;
                         }
                     }
+
+                    SendPullRequest((long) timeout.TotalMilliseconds);
                 }
                 else if (RedeliveryExceeded(dispatch))
                 {
@@ -1069,15 +1071,18 @@ namespace Apache.NMS.ActiveMQ
                     // Refresh the dispatch time
                     dispatchTime = DateTime.Now;
 
-                    if(dispatchTime > deadline)
-                    {
-                        // Out of time.
-                        timeout = TimeSpan.Zero;
-                    }
-                    else
+                    if(timeout > TimeSpan.Zero && !this.unconsumedMessages.Closed)
                     {
-                        // Adjust the timeout to the remaining time.
-                        timeout = deadline - dispatchTime;
+                        if(dispatchTime > deadline)
+                        {
+                            // Out of time.
+                            timeout = TimeSpan.Zero;
+                        }
+                        else
+                        {
+                            // Adjust the timeout to the remaining time.
+                            timeout = deadline - dispatchTime;
+                        }
                     }
 
                     SendPullRequest((long) timeout.TotalMilliseconds);


Mime
View raw message