File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
projects/client/RabbitMQ.Client/src/client Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -143,9 +143,9 @@ public interface IModel: IDisposable
143
143
///== null.</summary>
144
144
bool IsOpen { get ; }
145
145
146
- ///<summary>Returns the number of messages published since the
147
- ///channel was put in confirm mode. </summary>
148
- ulong ? PublishedMessageCount { get ; }
146
+ ///<summary>Returns the sequence number of the next message to be published that requires confirmation. 0 if we are not in confirm mode.
147
+ ///</summary>
148
+ ulong NextPublishSeqNo { get ; }
149
149
150
150
///<summary>Construct a completely empty content header for
151
151
///use with the Basic content class.</summary>
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ public abstract class ModelBase : IFullModel
89
89
public ManualResetEvent m_flowControlBlock = new ManualResetEvent ( true ) ;
90
90
private readonly object m_flowSendLock = new object ( ) ;
91
91
92
- private ulong ? m_pubMsgCount = null ;
92
+ private ulong m_nextPubSeqNo ;
93
93
94
94
public event ModelShutdownEventHandler ModelShutdown
95
95
{
@@ -458,11 +458,11 @@ public bool IsOpen
458
458
}
459
459
}
460
460
461
- public ulong ? PublishedMessageCount
461
+ public ulong NextPublishSeqNo
462
462
{
463
463
get
464
464
{
465
- return m_pubMsgCount ;
465
+ return m_nextPubSeqNo ;
466
466
}
467
467
}
468
468
@@ -753,7 +753,7 @@ public void ConfirmSelect() {
753
753
}
754
754
755
755
public void ConfirmSelect ( bool nowait ) {
756
- m_pubMsgCount = 0 ;
756
+ m_nextPubSeqNo = 1 ;
757
757
_Private_ConfirmSelect ( nowait ) ;
758
758
}
759
759
@@ -994,8 +994,7 @@ public void BasicPublish(string exchange,
994
994
{
995
995
basicProperties = CreateBasicProperties ( ) ;
996
996
}
997
- if ( m_pubMsgCount . HasValue )
998
- m_pubMsgCount ++ ;
997
+ if ( m_nextPubSeqNo > 0 ) m_nextPubSeqNo ++ ;
999
998
_Private_BasicPublish ( exchange ,
1000
999
routingKey ,
1001
1000
mandatory ,
You can’t perform that action at this time.
0 commit comments