Skip to content

Commit 5c92fe1

Browse files
author
Matthew Sackman
committed
Added support for exchange-to-exchange bindings
1 parent 4d79ded commit 5c92fe1

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

docs/specs/amqp0-9-1.stripped.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,32 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
239239
<method name="delete-ok" synchronous="1" index="21">
240240
<chassis name="client" implement="MUST"/>
241241
</method>
242+
<method name="bind" synchronous="1" index="30">
243+
<chassis name="server" implement="MUST"/>
244+
<response name="bind-ok"/>
245+
<field name="reserved-1" type="short" reserved="1"/>
246+
<field name="destination" domain="exchange-name"/>
247+
<field name="source" domain="exchange-name"/>
248+
<field name="routing-key" domain="shortstr"/>
249+
<field name="no-wait" domain="no-wait"/>
250+
<field name="arguments" domain="table"/>
251+
</method>
252+
<method name="bind-ok" synchronous="1" index="31">
253+
<chassis name="client" implement="MUST"/>
254+
</method>
255+
<method name="unbind" synchronous="1" index="40">
256+
<chassis name="server" implement="MUST"/>
257+
<response name="unbind-ok"/>
258+
<field name="reserved-1" type="short" reserved="1"/>
259+
<field name="destination" domain="exchange-name"/>
260+
<field name="source" domain="exchange-name"/>
261+
<field name="routing-key" domain="shortstr"/>
262+
<field name="no-wait" domain="no-wait"/>
263+
<field name="arguments" domain="table"/>
264+
</method>
265+
<method name="unbind-ok" synchronous="1" index="41">
266+
<chassis name="client" implement="MUST"/>
267+
</method>
242268
</class>
243269
<class name="queue" handler="channel" index="50">
244270
<chassis name="server" implement="MUST"/>

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,28 @@ void ExchangeDelete(string exchange,
197197
[AmqpNowaitArgument(null)]
198198
bool nowait);
199199

200+
///<summary>(Spec method) Bind an exchange to an exchange.</summary>
201+
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8"),
202+
AmqpUnsupported("RabbitMQ.Client.Framing.v0_8qpid"),
203+
AmqpUnsupported("RabbitMQ.Client.Framing.v0_9")]
204+
void ExchangeBind(string destination,
205+
string source,
206+
string routingKey,
207+
[AmqpNowaitArgument(null)]
208+
bool nowait,
209+
IDictionary arguments);
210+
211+
///<summary>(Spec method) Unbind an exchange from an exchange.</summary>
212+
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8"),
213+
AmqpUnsupported("RabbitMQ.Client.Framing.v0_8qpid"),
214+
AmqpUnsupported("RabbitMQ.Client.Framing.v0_9")]
215+
void ExchangeUnbind(string destination,
216+
string source,
217+
string routingKey,
218+
[AmqpNowaitArgument(null)]
219+
bool nowait,
220+
IDictionary arguments);
221+
200222
///<summary>(Spec method) Declare a queue.</summary>
201223
///<remarks>
202224
///The queue is declared non-passive, non-durable,

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,18 @@ public abstract void ExchangeDelete(string exchange,
571571
bool ifUnused,
572572
bool nowait);
573573

574+
public abstract void ExchangeBind(string destination,
575+
string source,
576+
string routingKey,
577+
bool nowait,
578+
IDictionary arguments);
579+
580+
public abstract void ExchangeUnbind(string destination,
581+
string source,
582+
string routingKey,
583+
bool nowait,
584+
IDictionary arguments);
585+
574586
//TODO: Mark these as virtual, maybe the model has an optimized way
575587
// of dealing with missing parameters.
576588
public string QueueDeclare()

0 commit comments

Comments
 (0)