Skip to content

Commit 6c99d1c

Browse files
Introduce IModel#ExchangeUnbindNoWait
1 parent 9cec5b9 commit 6c99d1c

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

projects/client/RabbitMQ.Client/src/client/api/IModel.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,13 @@ void ExchangeUnbind(string destination,
241241
string source,
242242
string routingKey);
243243

244+
///<summary>Like ExchangeUnbind but sets nowait to true.</summary>
245+
[AmqpMethodDoNotImplement(null)]
246+
void ExchangeUnbindNoWait(string destination,
247+
string source,
248+
string routingKey,
249+
IDictionary<string, object> arguments);
250+
244251
///<summary>(Spec method) Declare a queue.</summary>
245252
///<remarks>
246253
///The queue is declared non-passive, non-durable,

projects/client/RabbitMQ.Client/src/client/impl/ModelBase.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,14 @@ public void ExchangeUnbind(string destination,
880880
ExchangeUnbind(destination, source, routingKey, null);
881881
}
882882

883+
public void ExchangeUnbindNoWait(string destination,
884+
string source,
885+
string routingKey,
886+
IDictionary<string, object> arguments)
887+
{
888+
_Private_ExchangeUnbind(destination, source, routingKey, true, arguments);
889+
}
890+
883891
public abstract void _Private_ExchangeUnbind(string destination,
884892
string source,
885893
string routingKey,

projects/client/Unit/src/unit/TestNowait.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,20 @@ public void TestExchangeBindNoWait()
9898
}
9999
}
100100

101+
[Test]
102+
public void TestExchangeUnbindNoWait()
103+
{
104+
string x = GenerateExchangeName();
105+
try
106+
{
107+
Model.ExchangeDeclare(x, "fanout", false, true, null);
108+
Model.ExchangeBind(x, "amq.fanout", "", null);
109+
Model.ExchangeUnbindNoWait(x, "amq.fanout", "", null);
110+
} finally {
111+
Model.ExchangeDelete(x);
112+
}
113+
}
114+
101115
[Test]
102116
public void TestExchangeDeleteNoWait()
103117
{

0 commit comments

Comments
 (0)