Skip to content

Commit 5c7335e

Browse files
author
Matthias Radestock
committed
Document exclusivity of anonymous queue
1 parent 0e03573 commit 5c7335e

File tree

1 file changed

+33
-31
lines changed

1 file changed

+33
-31
lines changed

src/client/messagepatterns/Subscription.cs

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ public class Subscription: IEnumerable, IEnumerator, IDisposable {
136136
public BasicDeliverEventArgs LatestEvent { get { return m_latestEvent; } }
137137

138138
///<summary>Creates a new Subscription in "noAck" mode,
139-
///consuming from a fresh, autodelete, anonymous queue. The
140-
///name of the queue can be retrieved using the QueueName
141-
///property of the Subscription. After creating the queue, the
142-
///queue is bound to the named exchange, using Bind() with the
143-
///given routingKey bind parameter.</summary>
139+
///consuming from a fresh, exclusive, autodelete, anonymous
140+
///queue. The name of the queue can be retrieved using the
141+
///QueueName property of the Subscription. After creating the
142+
///queue, the queue is bound to the named exchange, using
143+
///Bind() with the given routingKey bind parameter.</summary>
144144
public Subscription(IModel model, string exchangeName,
145145
string exchangeType, string routingKey)
146146
: this(model)
@@ -149,20 +149,21 @@ public Subscription(IModel model, string exchangeName,
149149
}
150150

151151
///<summary>Creates a new Subscription in "noAck" mode,
152-
///consuming from a fresh, autodelete, anonymous queue. The
153-
///name of the queue can be retrieved using the QueueName
154-
///property of the Subscription.</summary>
152+
///consuming from a fresh, exclusive, autodelete, anonymous
153+
///queue. The name of the queue can be retrieved using the
154+
///QueueName property of the Subscription.</summary>
155155
public Subscription(IModel model)
156156
: this(model, null) {}
157157

158158
///<summary>Creates a new Subscription in "noAck" mode,
159159
///consuming from a named queue. If the queueName parameter is
160-
///null or the empty-string, creates a fresh, autodelete,
161-
///anonymous queue; otherwise, the queue is declared using
162-
///IModel.QueueDeclare() before IModel.BasicConsume() is
163-
///called. After declaring the queue and starting the
164-
///consumer, the queue is bound to the named exchange, using
165-
///Bind() with the given routingKey bind parameter.</summary>
160+
///null or the empty-string, creates a fresh, exclusive,
161+
///autodelete, anonymous queue; otherwise, the queue is
162+
///declared using IModel.QueueDeclare() before
163+
///IModel.BasicConsume() is called. After declaring the queue
164+
///and starting the consumer, the queue is bound to the named
165+
///exchange, using Bind() with the given routingKey bind
166+
///parameter.</summary>
166167
public Subscription(IModel model, string queueName, string exchangeName,
167168
string exchangeType, string routingKey)
168169
: this(model, queueName)
@@ -172,20 +173,20 @@ public Subscription(IModel model, string queueName, string exchangeName,
172173

173174
///<summary>Creates a new Subscription in "noAck" mode,
174175
///consuming from a named queue. If the queueName parameter is
175-
///null or the empty-string, creates a fresh, autodelete,
176-
///anonymous queue; otherwise, the queue is declared using
177-
///IModel.QueueDeclare() before IModel.BasicConsume() is
178-
///called.</summary>
176+
///null or the empty-string, creates a fresh, exclusive,
177+
///autodelete, anonymous queue; otherwise, the queue is
178+
///declared using IModel.QueueDeclare() before
179+
///IModel.BasicConsume() is called.</summary>
179180
public Subscription(IModel model, string queueName)
180181
: this(model, queueName, true) {}
181182

182183
///<summary>Creates a new Subscription, with full control over
183184
///both "noAck" mode and the name of the queue (which, if null
184-
///or the empty-string, will be a fresh autodelete queue, as
185-
///for the other constructor overloads). After declaring the
186-
///queue and starting the consumer, the queue is bound to the
187-
///named exchange, using Bind() with the given routingKey bind
188-
///parameter.</summary>
185+
///or the empty-string, will be a fresh, exclusive,
186+
///autodelete, anonymous queue, as for the other constructor
187+
///overloads). After declaring the queue and starting the
188+
///consumer, the queue is bound to the named exchange, using
189+
///Bind() with the given routingKey bind parameter.</summary>
189190
public Subscription(IModel model, string queueName, bool noAck,
190191
string exchangeName, string exchangeType, string routingKey)
191192
: this(model, queueName, noAck)
@@ -195,8 +196,9 @@ public Subscription(IModel model, string queueName, bool noAck,
195196

196197
///<summary>Creates a new Subscription, with full control over
197198
///both "noAck" mode and the name of the queue (which, if null
198-
///or the empty-string, will be a fresh autodelete queue, as
199-
///for the other constructor overloads).</summary>
199+
///or the empty-string, will be a fresh, exclusive,
200+
///autodelete, anonymous queue, as for the other constructor
201+
///overloads).</summary>
200202
public Subscription(IModel model, string queueName, bool noAck)
201203
{
202204
m_model = model;
@@ -213,12 +215,12 @@ public Subscription(IModel model, string queueName, bool noAck)
213215
}
214216

215217
///<summary>Closes this Subscription, cancelling the consumer
216-
///record in the server. If an anonymous, autodelete queue
217-
///(i.e., one with a server-generated name) was created during
218-
///construction of the Subscription, this method also deletes
219-
///the created queue (which is an optimisation: autodelete
220-
///queues will be deleted when the IModel closes in any
221-
///case).</summary>
218+
///record in the server. If an anonymous, exclusive,
219+
///autodelete queue (i.e., one with a server-generated name)
220+
///was created during construction of the Subscription, this
221+
///method also deletes the created queue (which is an
222+
///optimisation: autodelete queues will be deleted when the
223+
///IModel closes in any case).</summary>
222224
public void Close()
223225
{
224226
try {

0 commit comments

Comments
 (0)