Create new tag to build the 1.7.1 release package from.
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 @@
                         }
                     }
 
+                    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 @@
                     // 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 @@
             }
         }
 
-        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);
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 @@
             }
         }
 
+        internal long LastDeliveredSequenceId
+        {
+            get { return this.lastDeliveredSequenceId; }
+        }
+
         #endregion
 
         #region ISession Members
diff --git a/src/test/csharp/QueueConsumerPriorityTest.cs b/src/test/csharp/QueueConsumerPriorityTest.cs
index 266fd91..2d6b947 100644
--- a/src/test/csharp/QueueConsumerPriorityTest.cs
+++ b/src/test/csharp/QueueConsumerPriorityTest.cs
@@ -101,6 +101,10 @@
         {
             IConnection conn = createConnection(true);
 
+            Connection connection = conn as Connection;
+            Assert.IsNotNull(connection);
+            connection.MessagePrioritySupported = true;
+
             ISession receiverSession = conn.CreateSession();
             ISession senderSession = conn.CreateSession();