You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2017/03/08 23:12:39 UTC
[37/50] [abbrv] activemq-nms-openwire git commit:
https://issues.apache.org/jira/browse/AMQNET-489
https://issues.apache.org/jira/browse/AMQNET-489
Ensure that the lastDeliveredSequenceId gets sent when the ConnectionInfo is sent.
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/0d92ec56
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/tree/0d92ec56
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/diff/0d92ec56
Branch: refs/heads/1.7.x
Commit: 0d92ec561181501241a5ea7b902432f9c1231a07
Parents: 80368b0
Author: Timothy A. Bish <ta...@apache.org>
Authored: Wed Sep 30 18:53:27 2015 +0000
Committer: Timothy A. Bish <ta...@apache.org>
Committed: Wed Sep 30 18:53:27 2015 +0000
----------------------------------------------------------------------
src/main/csharp/Connection.cs | 8 ++++++--
src/main/csharp/Session.cs | 5 +++++
2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/blob/0d92ec56/src/main/csharp/Connection.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Connection.cs b/src/main/csharp/Connection.cs
index a4a5247..74be66f 100755
--- a/src/main/csharp/Connection.cs
+++ b/src/main/csharp/Connection.cs
@@ -713,11 +713,13 @@ namespace Apache.NMS.ActiveMQ
}
}
+ long lastDeliveredSequenceId = -1;
lock(sessions.SyncRoot)
{
foreach(Session session in sessions)
{
session.Shutdown();
+ lastDeliveredSequenceId = Math.Max(lastDeliveredSequenceId, session.LastDeliveredSequenceId);
}
}
sessions.Clear();
@@ -740,7 +742,7 @@ namespace Apache.NMS.ActiveMQ
// inform the broker of a remove, and if the transport is failed, why bother.
if(connected.Value && !transportFailed.Value)
{
- DisposeOf(ConnectionId);
+ DisposeOf(ConnectionId, lastDeliveredSequenceId);
ShutdownInfo shutdowninfo = new ShutdownInfo();
transport.Oneway(shutdowninfo);
}
@@ -908,12 +910,14 @@ namespace Apache.NMS.ActiveMQ
}
}
- private void DisposeOf(DataStructure objectId)
+ private void DisposeOf(DataStructure objectId, long lastDeliveredSequenceId)
{
try
{
RemoveInfo command = new RemoveInfo();
command.ObjectId = objectId;
+ command.LastDeliveredSequenceId = lastDeliveredSequenceId;
+
if(asyncClose)
{
Tracer.DebugFormat("Connection[{0}]: Asynchronously disposing of Connection.", this.ConnectionId);
http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/blob/0d92ec56/src/main/csharp/Session.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Session.cs b/src/main/csharp/Session.cs
index 8fd6db3..ef91700 100755
--- a/src/main/csharp/Session.cs
+++ b/src/main/csharp/Session.cs
@@ -305,6 +305,11 @@ namespace Apache.NMS.ActiveMQ
}
}
+ internal long LastDeliveredSequenceId
+ {
+ get { return this.lastDeliveredSequenceId; }
+ }
+
#endregion
#region ISession Members