Skip to content

Commit 6759a28

Browse files
Improve IModel API reference docs a bit
* Mention that routing key must be shorter than 255 (per AMQP 0-9-1 spec) * Remove spec vs. extension remarks that are not very relevant in 2017
1 parent 4cd798b commit 6759a28

File tree

1 file changed

+66
-23
lines changed
  • projects/client/RabbitMQ.Client/src/client/api

1 file changed

+66
-23
lines changed

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

Lines changed: 66 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public interface IModel : IDisposable
182182
void Abort(ushort replyCode, string replyText);
183183

184184
/// <summary>
185-
/// (Spec method) Acknowledge one or more delivered message(s).
185+
/// Acknowledge one or more delivered message(s).
186186
/// </summary>
187187
void BasicAck(ulong deliveryTag, bool multiple);
188188

@@ -204,7 +204,7 @@ string BasicConsume(
204204
IBasicConsumer consumer);
205205

206206
/// <summary>
207-
/// (Spec method) Retrieve an individual message, if
207+
/// Retrieve an individual message, if
208208
/// one is available; returns null if the server answers that
209209
/// no messages are currently available. See also <see cref="IModel.BasicAck"/>.
210210
/// </summary>
@@ -215,29 +215,36 @@ string BasicConsume(
215215
void BasicNack(ulong deliveryTag, bool multiple, bool requeue);
216216

217217
/// <summary>
218-
/// (Spec method) Publishes a message.
218+
/// Publishes a message.
219219
/// </summary>
220+
/// <remarks>
221+
/// <para>
222+
/// Routing key must be shorter than 255 bytes.
223+
/// </para>
224+
/// </remarks>
220225
[AmqpMethodDoNotImplement(null)]
221226
void BasicPublish(string exchange, string routingKey, bool mandatory,
222227
IBasicProperties basicProperties, byte[] body);
223228

224229
/// <summary>
225-
/// (Spec method) Configures QoS parameters of the Basic content-class.
230+
/// Configures QoS parameters of the Basic content-class.
226231
/// </summary>
227232
void BasicQos(uint prefetchSize, ushort prefetchCount, bool global);
228233

229234
/// <summary>
230-
/// (Spec method).
235+
/// Indicates that a consumer has recovered.
236+
/// Deprecated. Should not be used.
231237
/// </summary>
232238
[AmqpMethodDoNotImplement(null)]
233239
void BasicRecover(bool requeue);
234240

235241
/// <summary>
236-
/// (Spec method).
242+
/// Indicates that a consumer has recovered.
243+
/// Deprecated. Should not be used.
237244
/// </summary>
238245
void BasicRecoverAsync(bool requeue);
239246

240-
/// <summary>(Spec method) Reject a delivered message.</summary>
247+
/// <summary> Reject a delivered message.</summary>
241248
void BasicReject(ulong deliveryTag, bool requeue);
242249

243250
/// <summary>Close this session.</summary>
@@ -278,18 +285,28 @@ void BasicPublish(string exchange, string routingKey, bool mandatory,
278285
IBasicProperties CreateBasicProperties();
279286

280287
/// <summary>
281-
/// (Extension method) Bind an exchange to an exchange.
288+
/// Bind an exchange to an exchange.
282289
/// </summary>
290+
/// <remarks>
291+
/// <para>
292+
/// Routing key must be shorter than 255 bytes.
293+
/// </para>
294+
/// </remarks>
283295
[AmqpMethodDoNotImplement(null)]
284296
void ExchangeBind(string destination, string source, string routingKey, IDictionary<string, object> arguments);
285297

286298
/// <summary>
287-
///Like ExchangeBind but sets nowait to true.
299+
/// Like ExchangeBind but sets nowait to true.
288300
/// </summary>
301+
/// <remarks>
302+
/// <para>
303+
/// Routing key must be shorter than 255 bytes.
304+
/// </para>
305+
/// </remarks>
289306
void ExchangeBindNoWait(string destination, string source, string routingKey,
290307
IDictionary<string, object> arguments);
291308

292-
/// <summary>(Spec method) Declare an exchange.</summary>
309+
/// <summary>Declare an exchange.</summary>
293310
/// <remarks>
294311
/// The exchange is declared non-passive and non-internal.
295312
/// The "nowait" option is not exercised.
@@ -306,28 +323,34 @@ void ExchangeDeclareNoWait(string exchange, string type, bool durable, bool auto
306323
IDictionary<string, object> arguments);
307324

308325
/// <summary>
309-
/// (Spec method) Declare an exchange.
326+
/// Do a passive exchange declaration.
310327
/// </summary>
311328
/// <remarks>
312-
/// The exchange is declared passive.
329+
/// This method performs a "passive declare" on an exchange,
330+
/// which verifies whether .
331+
/// It will do nothing if the exchange already exists and result
332+
/// in a channel-level protocol exception (channel closure) if not.
313333
/// </remarks>
314334
[AmqpMethodDoNotImplement(null)]
315335
void ExchangeDeclarePassive(string exchange);
316336

317337
/// <summary>
318-
/// (Spec method) Delete an exchange.
338+
/// Delete an exchange.
319339
/// </summary>
320340
[AmqpMethodDoNotImplement(null)]
321341
void ExchangeDelete(string exchange, bool ifUnused);
322342

323343
/// <summary>
324-
///Like ExchangeDelete but sets nowait to true.
344+
/// Like ExchangeDelete but sets nowait to true.
325345
/// </summary>
326346
void ExchangeDeleteNoWait(string exchange, bool ifUnused);
327347

328348
/// <summary>
329-
/// (Extension method) Unbind an exchange from an exchange.
349+
/// Unbind an exchange from an exchange.
330350
/// </summary>
351+
/// <remarks>
352+
/// Routing key must be shorter than 255 bytes.
353+
/// </remarks>
331354
[AmqpMethodDoNotImplement(null)]
332355
void ExchangeUnbind(string destination,
333356
string source,
@@ -337,20 +360,35 @@ void ExchangeUnbind(string destination,
337360
/// <summary>
338361
/// Like ExchangeUnbind but sets nowait to true.
339362
/// </summary>
363+
/// <remarks>
364+
/// <para>
365+
/// Routing key must be shorter than 255 bytes.
366+
/// </para>
367+
/// </remarks>
340368
[AmqpMethodDoNotImplement(null)]
341369
void ExchangeUnbindNoWait(string destination, string source, string routingKey,
342370
IDictionary<string, object> arguments);
343371

344372
/// <summary>
345-
/// (Spec method) Bind a queue to an exchange.
373+
/// Bind a queue to an exchange.
346374
/// </summary>
375+
/// <remarks>
376+
/// <para>
377+
/// Routing key must be shorter than 255 bytes.
378+
/// </para>
379+
/// </remarks>
347380
[AmqpMethodDoNotImplement(null)]
348381
void QueueBind(string queue, string exchange, string routingKey, IDictionary<string, object> arguments);
349382

350383
/// <summary>Same as QueueBind but sets nowait parameter to true.</summary>
384+
/// <remarks>
385+
/// <para>
386+
/// Routing key must be shorter than 255 bytes.
387+
/// </para>
388+
/// </remarks>
351389
void QueueBindNoWait(string queue, string exchange, string routingKey, IDictionary<string, object> arguments);
352390

353-
/// <summary>(Spec method) Declare a queue.</summary>
391+
/// <summary> Declare a queue.</summary>
354392
[AmqpMethodDoNotImplement(null)]
355393
QueueDeclareOk QueueDeclare(string queue, bool durable, bool exclusive,
356394
bool autoDelete, IDictionary<string, object> arguments);
@@ -391,7 +429,7 @@ void QueueDeclareNoWait(string queue, bool durable,
391429
uint ConsumerCount(string queue);
392430

393431
/// <summary>
394-
/// (Spec method) Delete a queue.
432+
/// Delete a queue.
395433
/// </summary>
396434
/// <remarks>
397435
///Returns the number of messages purged during queue deletion.
@@ -407,7 +445,7 @@ void QueueDeclareNoWait(string queue, bool durable,
407445
void QueueDeleteNoWait(string queue, bool ifUnused, bool ifEmpty);
408446

409447
/// <summary>
410-
/// (Spec method) Purge a queue of messages.
448+
/// Purge a queue of messages.
411449
/// </summary>
412450
/// <remarks>
413451
/// Returns the number of messages purged.
@@ -416,22 +454,27 @@ void QueueDeclareNoWait(string queue, bool durable,
416454
uint QueuePurge(string queue);
417455

418456
/// <summary>
419-
/// (Spec method) Unbind a queue from an exchange.
457+
/// Unbind a queue from an exchange.
420458
/// </summary>
459+
/// <remarks>
460+
/// <para>
461+
/// Routing key must be shorter than 255 bytes.
462+
/// </para>
463+
/// </remarks>
421464
void QueueUnbind(string queue, string exchange, string routingKey, IDictionary<string, object> arguments);
422465

423466
/// <summary>
424-
/// (Spec method) Commit this session's active TX transaction.
467+
/// Commit this session's active TX transaction.
425468
/// </summary>
426469
void TxCommit();
427470

428471
/// <summary>
429-
/// (Spec method) Roll back this session's active TX transaction.
472+
/// Roll back this session's active TX transaction.
430473
/// </summary>
431474
void TxRollback();
432475

433476
/// <summary>
434-
/// (Spec method) Enable TX mode for this session.
477+
/// Enable TX mode for this session.
435478
/// </summary>
436479
void TxSelect();
437480

0 commit comments

Comments
 (0)