Skip to content

Commit d7566b3

Browse files
committed
* Remove WaitForConfirms and WaitForConfirmsOrDie
1 parent 647dffb commit d7566b3

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

projects/RabbitMQ.Client/PublicAPI.Unshipped.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,7 @@ RabbitMQ.Client.IChannel.FlowControl -> System.EventHandler<RabbitMQ.Client.Even
498498
RabbitMQ.Client.IChannel.IsClosed.get -> bool
499499
RabbitMQ.Client.IChannel.IsOpen.get -> bool
500500
RabbitMQ.Client.IChannel.NextPublishSeqNo.get -> ulong
501-
RabbitMQ.Client.IChannel.WaitForConfirms() -> bool
502501
RabbitMQ.Client.IChannel.WaitForConfirmsAsync(System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<bool>
503-
RabbitMQ.Client.IChannel.WaitForConfirmsOrDie() -> void
504502
RabbitMQ.Client.IChannel.WaitForConfirmsOrDieAsync(System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task
505503
RabbitMQ.Client.IChannelExtensions
506504
RabbitMQ.Client.IConnection

projects/RabbitMQ.Client/client/api/IChannel.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,6 @@ Task<QueueDeclareOk> QueueDeclareAsync(string queue, bool durable, bool exclusiv
666666
void TxRollback();
667667
/// <summary>Enable TX mode for this session.</summary>
668668
void TxSelect();
669-
#endif
670669

671670
/// <summary>
672671
/// Wait until all published messages on this channel have been confirmed.
@@ -681,6 +680,18 @@ Task<QueueDeclareOk> QueueDeclareAsync(string queue, bool durable, bool exclusiv
681680
/// </remarks>
682681
bool WaitForConfirms();
683682

683+
/// <summary>
684+
/// Wait until all published messages on this channel have been confirmed.
685+
/// </summary>
686+
/// <remarks>
687+
/// Waits until all messages published on this channel since the last call have
688+
/// been ack'd by the server. If a nack is received or the timeout
689+
/// elapses, throws an IOException exception immediately and closes
690+
/// the channel.
691+
/// </remarks>
692+
void WaitForConfirmsOrDie();
693+
#endif
694+
684695
/// <summary>
685696
/// Asynchronously wait until all published messages on this channel have been confirmed.
686697
/// </summary>
@@ -695,17 +706,6 @@ Task<QueueDeclareOk> QueueDeclareAsync(string queue, bool durable, bool exclusiv
695706
/// </remarks>
696707
Task<bool> WaitForConfirmsAsync(CancellationToken token = default);
697708

698-
/// <summary>
699-
/// Wait until all published messages on this channel have been confirmed.
700-
/// </summary>
701-
/// <remarks>
702-
/// Waits until all messages published on this channel since the last call have
703-
/// been ack'd by the server. If a nack is received or the timeout
704-
/// elapses, throws an IOException exception immediately and closes
705-
/// the channel.
706-
/// </remarks>
707-
void WaitForConfirmsOrDie();
708-
709709
/// <summary>
710710
/// Wait until all published messages on this channel have been confirmed.
711711
/// </summary>

projects/RabbitMQ.Client/client/impl/AutorecoveringChannel.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -669,16 +669,16 @@ public void TxSelect()
669669
InnerChannel.TxSelect();
670670
_usesTransactions = true;
671671
}
672-
#endif
673672

674673
public bool WaitForConfirms()
675674
=> InnerChannel.WaitForConfirms();
676675

677-
public Task<bool> WaitForConfirmsAsync(CancellationToken token = default)
678-
=> InnerChannel.WaitForConfirmsAsync(token);
679-
680676
public void WaitForConfirmsOrDie()
681677
=> InnerChannel.WaitForConfirmsOrDie();
678+
#endif
679+
680+
public Task<bool> WaitForConfirmsAsync(CancellationToken token = default)
681+
=> InnerChannel.WaitForConfirmsAsync(token);
682682

683683
public Task WaitForConfirmsOrDieAsync(CancellationToken token = default)
684684
=> InnerChannel.WaitForConfirmsOrDieAsync(token);

projects/RabbitMQ.Client/client/impl/ChannelBase.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,10 +1997,12 @@ await ModelSendAsync(method)
19971997

19981998
private List<TaskCompletionSource<bool>> _confirmsTaskCompletionSources;
19991999

2000+
#if SYNC_API
20002001
public bool WaitForConfirms()
20012002
{
20022003
return WaitForConfirmsAsync().EnsureCompleted();
20032004
}
2005+
#endif
20042006

20052007
public Task<bool> WaitForConfirmsAsync(CancellationToken token = default)
20062008
{
@@ -2059,10 +2061,12 @@ await tokenRegistration.DisposeAsync()
20592061
}
20602062
}
20612063

2064+
#if SYNC_API
20622065
public void WaitForConfirmsOrDie()
20632066
{
20642067
WaitForConfirmsOrDieAsync().EnsureCompleted();
20652068
}
2069+
#endif
20662070

20672071
public async Task WaitForConfirmsOrDieAsync(CancellationToken token = default)
20682072
{

0 commit comments

Comments
 (0)