Skip to content

Commit 01ae67e

Browse files
committed
Graft the 0-9 queue.unbind{,-ok} methods into our generic 0-8 implementation.
1 parent 2feae7d commit 01ae67e

File tree

3 files changed

+62
-9
lines changed

3 files changed

+62
-9
lines changed

docs/specs/amqp0-8.xml

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0"?>
2-
2+
<!-- WARNING: Modified from the official 0-8 specification XML by
3+
the addition of queue.unbind, queue.unbind-ok -->
34
<!--
45
Copyright Notice
56
================
@@ -1618,6 +1619,59 @@ localised reply text
16181619
</doc>
16191620
<chassis name="client" implement="MUST"/>
16201621
</method>
1622+
1623+
<!-- Unofficial additions to the 0-8 protocol, lifted from the 0-9
1624+
protocol specification: queue.unbind, queue.unbind-ok -->
1625+
1626+
<method name = "unbind" synchronous = "1" index = "50" label = "unbind a queue from an exchange">
1627+
<doc>This method unbinds a queue from an exchange.</doc>
1628+
<rule name = "01">
1629+
<doc>If a unbind fails, the server MUST raise a connection exception.</doc>
1630+
</rule>
1631+
<chassis name="server" implement="MUST"/>
1632+
<response name="unbind-ok"/>
1633+
1634+
<field name = "ticket" domain = "access ticket">
1635+
<doc>
1636+
The client provides a valid access ticket giving "active"
1637+
access rights to the queue's access realm.
1638+
</doc>
1639+
</field>
1640+
1641+
<field name = "queue" domain = "queue name">
1642+
<doc>Specifies the name of the queue to unbind.</doc>
1643+
<rule name = "02">
1644+
<doc>
1645+
If the queue does not exist the server MUST raise a channel exception
1646+
with reply code 404 (not found).
1647+
</doc>
1648+
</rule>
1649+
</field>
1650+
1651+
<field name = "exchange" domain = "exchange name">
1652+
<doc>The name of the exchange to unbind from.</doc>
1653+
<rule name = "03">
1654+
<doc>
1655+
If the exchange does not exist the server MUST raise a channel
1656+
exception with reply code 404 (not found).
1657+
</doc>
1658+
</rule>
1659+
</field>
1660+
1661+
<field name = "routing key" domain = "shortstr" label = "routing key of binding">
1662+
<doc>Specifies the routing key of the binding to unbind.</doc>
1663+
</field>
1664+
1665+
<field name = "arguments" domain = "table" label = "arguments of binding">
1666+
<doc>Specifies the arguments of the binding to unbind.</doc>
1667+
</field>
1668+
</method>
1669+
1670+
<method name = "unbind-ok" synchronous = "1" index = "51" label = "confirm unbind successful">
1671+
<doc>This method confirms that the unbind was successful.</doc>
1672+
<chassis name = "client" implement = "MUST"/>
1673+
</method>
1674+
16211675
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
16221676
<method name="purge" synchronous="1" index="30">
16231677
purge a queue

docs/wikipages/data.ApiGen.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -539,19 +539,17 @@ particular implementations to complain if these features are used by
539539
applications:
540540

541541
@code java
542-
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8")]
543542
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8qpid")]
544543
void QueueUnbind(string queue,
545544
string exchange,
546545
string routingKey,
547546
IDictionary arguments);
548547

549548
In the example above, [code queue.unbind] is marked as unsupported by
550-
both the standard and QPid-specific variants of the 0-8 protocol,
551-
since it appeared first in the 0-9 protocol specification.
552-
553-
Clients using either of the 0-8 [code IProtocol] implementations will,
554-
at runtime, receive a thrown [code UnsupportedMethodException].
549+
the QPid-specific variant of the 0-8 protocol. Clients using the
550+
QPid-specific 0-8 [code IProtocol] implementation will, at runtime,
551+
receive a thrown [code UnsupportedMethodException] if they call
552+
QueueUnbind.
555553

556554
@code java
557555
[AmqpForceOneWay]

src/client/api/IModel.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,10 @@ void QueueBind(string queue,
205205
///<summary>(Spec method) Unbind a queue from an exchange.</summary>
206206
///<remarks>
207207
///Note: This operation is only supported when communicating
208-
///using AMQP protocol version 0-9.
208+
///using AMQP protocol version 0-9, or when communicating with
209+
///a 0-8 broker that has been enhanced with the unofficial
210+
///addition of a queue.unbind method.
209211
///</remarks>
210-
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8")]
211212
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8qpid")]
212213
void QueueUnbind(string queue,
213214
string exchange,

0 commit comments

Comments
 (0)