@@ -151,37 +151,61 @@ public interface IChannel : IDisposable
151
151
/// </remarks>
152
152
event EventHandler < ShutdownEventArgs > ChannelShutdown ;
153
153
154
- /// <summary>
155
- /// Acknowledge one or more delivered message(s).
156
- /// </summary >
154
+ /// <summary>Acknknowledges one or more messages.</summary>
155
+ /// <param name="deliveryTag">The delivery tag.</param>
156
+ /// <param name="multiple">Ack all messages up to the delivery tag if set to <c>true</c>.</param >
157
157
void BasicAck ( ulong deliveryTag , bool multiple ) ;
158
158
159
- /// <summary>
160
- /// Delete a Basic content-class consumer.
161
- /// </summary>
159
+ /// <summary>Asynchronously acknknowledges one or more messages.</summary>
160
+ /// <param name="deliveryTag">The delivery tag.</param>
161
+ /// <param name="multiple">Ack all messages up to the delivery tag if set to <c>true</c>.</param>
162
+ ValueTask BasicAckAsync ( ulong deliveryTag , bool multiple ) ;
163
+
164
+ /// <summary>Cancel a Basic content-class consumer.</summary>
165
+ /// <param name="consumerTag">The consumer tag.</param>
162
166
void BasicCancel ( string consumerTag ) ;
163
167
168
+ /// <summary>Asynchronously cancel a Basic content-class consumer.</summary>
169
+ /// <param name="consumerTag">The consumer tag.</param>
170
+ ValueTask BasicCancelAsync ( string consumerTag ) ;
171
+
164
172
/// <summary>
165
173
/// Same as BasicCancel but sets nowait to true and returns void (as there
166
174
/// will be no response from the server).
167
175
/// </summary>
176
+ /// <param name="consumerTag">The consumer tag.</param>
168
177
void BasicCancelNoWait ( string consumerTag ) ;
169
178
170
179
/// <summary>Start a Basic content-class consumer.</summary>
171
- string BasicConsume (
172
- string queue ,
173
- bool autoAck ,
174
- string consumerTag ,
175
- bool noLocal ,
176
- bool exclusive ,
177
- IDictionary < string , object > arguments ,
178
- IBasicConsumer consumer ) ;
180
+ /// <param name="queue">The queue.</param>
181
+ /// <param name="autoAck">If set to <c>true</c>, automatically ack messages.</param>
182
+ /// <param name="consumerTag">The consumer tag.</param>
183
+ /// <param name="noLocal">If set to <c>true</c>, this consumer will not receive messages published by the same connection.</param>
184
+ /// <param name="exclusive">If set to <c>true</c>, the consumer is exclusive.</param>
185
+ /// <param name="arguments">Consumer arguments.</param>
186
+ /// <param name="consumer">The consumer, an instance of <see cref="IBasicConsumer"/></param>
187
+ /// <returns></returns>
188
+ string BasicConsume ( string queue , bool autoAck , string consumerTag , bool noLocal , bool exclusive , IDictionary < string , object > arguments , IBasicConsumer consumer ) ;
189
+
190
+ /// <summary>Asynchronously start a Basic content-class consumer.</summary>
191
+ /// <param name="queue">The queue.</param>
192
+ /// <param name="autoAck">If set to <c>true</c>, automatically ack messages.</param>
193
+ /// <param name="consumerTag">The consumer tag.</param>
194
+ /// <param name="noLocal">If set to <c>true</c>, this consumer will not receive messages published by the same connection.</param>
195
+ /// <param name="exclusive">If set to <c>true</c>, the consumer is exclusive.</param>
196
+ /// <param name="arguments">Consumer arguments.</param>
197
+ /// <param name="consumer">The consumer, an instance of <see cref="IBasicConsumer"/></param>
198
+ /// <returns></returns>
199
+ ValueTask < string > BasicConsumeAsync ( string queue , bool autoAck , string consumerTag , bool noLocal , bool exclusive , IDictionary < string , object > arguments , IBasicConsumer consumer ) ;
179
200
180
201
/// <summary>
181
202
/// Retrieve an individual message, if
182
203
/// one is available; returns null if the server answers that
183
- /// no messages are currently available. See also <see cref="IChannel.BasicAck"/>.
204
+ /// no messages are currently available. See also <see cref="IChannel.BasicAck" />.
184
205
/// </summary>
206
+ /// <param name="queue">The queue.</param>
207
+ /// <param name="autoAck">If set to <c>true</c>, automatically ack the message.</param>
208
+ /// <returns><see cref="BasicGetResult"/></returns>
185
209
BasicGetResult BasicGet ( string queue , bool autoAck ) ;
186
210
187
211
/// <summary>Reject one or more delivered message(s).</summary>
@@ -238,23 +262,41 @@ ValueTask BasicPublishAsync<TProperties>(CachedString exchange, CachedString rou
238
262
/// <summary>
239
263
/// Configures QoS parameters of the Basic content-class.
240
264
/// </summary>
265
+ /// <param name="prefetchSize">Size of the prefetch in bytes.</param>
266
+ /// <param name="prefetchCount">The prefetch count.</param>
267
+ /// <param name="global">If set to <c>true</c>, use global prefetch.
268
+ /// See the <seealso href="https://www.rabbitmq.com/consumer-prefetch.html#overview">Consumer Prefetch documentation</seealso>.</param>
241
269
void BasicQos ( uint prefetchSize , ushort prefetchCount , bool global ) ;
242
270
271
+ /// <summary>
272
+ /// Configures QoS parameters of the Basic content-class.
273
+ /// </summary>
274
+ /// <param name="prefetchSize">Size of the prefetch in bytes.</param>
275
+ /// <param name="prefetchCount">The prefetch count.</param>
276
+ /// <param name="global">If set to <c>true</c>, use global prefetch.
277
+ /// See the <seealso href="https://www.rabbitmq.com/consumer-prefetch.html#overview">Consumer Prefetch documentation</seealso>.</param>
278
+ ValueTask BasicQosAsync ( uint prefetchSize , ushort prefetchCount , bool global ) ;
279
+
243
280
/// <summary>
244
281
/// Indicates that a consumer has recovered.
245
282
/// Deprecated. Should not be used.
246
283
/// </summary>
284
+ [ Obsolete ]
247
285
void BasicRecover ( bool requeue ) ;
248
286
249
287
/// <summary>
250
288
/// Indicates that a consumer has recovered.
251
289
/// Deprecated. Should not be used.
252
290
/// </summary>
291
+ [ Obsolete ]
253
292
void BasicRecoverAsync ( bool requeue ) ;
254
293
255
294
/// <summary> Reject a delivered message.</summary>
256
295
void BasicReject ( ulong deliveryTag , bool requeue ) ;
257
296
297
+ /// <summary> Reject a delivered message.</summary>
298
+ ValueTask BasicRejectAsync ( ulong deliveryTag , bool requeue ) ;
299
+
258
300
/// <summary>Close this session.</summary>
259
301
/// <param name="replyCode">The reply code to send for closing (See under "Reply Codes" in the AMQP specification).</param>
260
302
/// <param name="replyText">The reply text to send for closing.</param>
@@ -276,6 +318,16 @@ ValueTask BasicPublishAsync<TProperties>(CachedString exchange, CachedString rou
276
318
/// </remarks>
277
319
void ExchangeBind ( string destination , string source , string routingKey , IDictionary < string , object > arguments ) ;
278
320
321
+ /// <summary>
322
+ /// Asynchronously binds an exchange to an exchange.
323
+ /// </summary>
324
+ /// <remarks>
325
+ /// <para>
326
+ /// Routing key must be shorter than 255 bytes.
327
+ /// </para>
328
+ /// </remarks>
329
+ ValueTask ExchangeBindAsync ( string destination , string source , string routingKey , IDictionary < string , object > arguments ) ;
330
+
279
331
/// <summary>
280
332
/// Like ExchangeBind but sets nowait to true.
281
333
/// </summary>
@@ -289,10 +341,17 @@ ValueTask BasicPublishAsync<TProperties>(CachedString exchange, CachedString rou
289
341
/// <summary>Declare an exchange.</summary>
290
342
/// <remarks>
291
343
/// The exchange is declared non-passive and non-internal.
292
- /// The "nowait" option is not exercised .
344
+ /// The "nowait" option is not used .
293
345
/// </remarks>
294
346
void ExchangeDeclare ( string exchange , string type , bool durable , bool autoDelete , IDictionary < string , object > arguments ) ;
295
347
348
+ /// <summary>Asynchronously declare an exchange.</summary>
349
+ /// <remarks>
350
+ /// The exchange is declared non-internal.
351
+ /// The "nowait" option is not used.
352
+ /// </remarks>
353
+ ValueTask ExchangeDeclareAsync ( string exchange , string type , bool passive , bool durable , bool autoDelete , IDictionary < string , object > arguments ) ;
354
+
296
355
/// <summary>
297
356
/// Same as ExchangeDeclare but sets nowait to true and returns void (as there
298
357
/// will be no response from the server).
@@ -315,6 +374,19 @@ ValueTask BasicPublishAsync<TProperties>(CachedString exchange, CachedString rou
315
374
/// </summary>
316
375
void ExchangeDelete ( string exchange , bool ifUnused ) ;
317
376
377
+ /*
378
+ * TODO LRB rabbitmq/rabbitmq-dotnet-client#1347
379
+ /// <summary>
380
+ /// Asynchronously delete an exchange.
381
+ /// </summary>
382
+ ValueTask ExchangeDeleteAsync(string exchange, bool ifUnused);
383
+ */
384
+
385
+ /// <summary>
386
+ /// Asynchronously delete an exchange.
387
+ /// </summary>
388
+ ValueTask ExchangeDeleteAsync ( string exchange , bool ifUnused ) ;
389
+
318
390
/// <summary>
319
391
/// Like ExchangeDelete but sets nowait to true.
320
392
/// </summary>
@@ -328,6 +400,14 @@ ValueTask BasicPublishAsync<TProperties>(CachedString exchange, CachedString rou
328
400
/// </remarks>
329
401
void ExchangeUnbind ( string destination , string source , string routingKey , IDictionary < string , object > arguments ) ;
330
402
403
+ /// <summary>
404
+ /// Asynchronously unbind an exchange from an exchange.
405
+ /// </summary>
406
+ /// <remarks>
407
+ /// Routing key must be shorter than 255 bytes.
408
+ /// </remarks>
409
+ ValueTask ExchangeUnbindAsync ( string destination , string source , string routingKey , IDictionary < string , object > arguments ) ;
410
+
331
411
/// <summary>
332
412
/// Like ExchangeUnbind but sets nowait to true.
333
413
/// </summary>
@@ -348,6 +428,16 @@ ValueTask BasicPublishAsync<TProperties>(CachedString exchange, CachedString rou
348
428
/// </remarks>
349
429
void QueueBind ( string queue , string exchange , string routingKey , IDictionary < string , object > arguments ) ;
350
430
431
+ /// <summary>
432
+ /// Asynchronously bind a queue to an exchange.
433
+ /// </summary>
434
+ /// <remarks>
435
+ /// <para>
436
+ /// Routing key must be shorter than 255 bytes.
437
+ /// </para>
438
+ /// </remarks>
439
+ ValueTask QueueBindAsync ( string queue , string exchange , string routingKey , IDictionary < string , object > arguments ) ;
440
+
351
441
/// <summary>Same as QueueBind but sets nowait parameter to true.</summary>
352
442
/// <remarks>
353
443
/// <para>
@@ -370,11 +460,12 @@ ValueTask BasicPublishAsync<TProperties>(CachedString exchange, CachedString rou
370
460
/// Asynchronously declares a queue. See the <a href="https://www.rabbitmq.com/queues.html">Queues guide</a> to learn more.
371
461
/// </summary>
372
462
/// <param name="queue">The name of the queue. Pass an empty string to make the server generate a name.</param>
463
+ /// <param name="passive">Set to <code>true</code> to passively declare the queue (i.e. check for its existence)</param>
373
464
/// <param name="durable">Should this queue will survive a broker restart?</param>
374
465
/// <param name="exclusive">Should this queue use be limited to its declaring connection? Such a queue will be deleted when its declaring connection closes.</param>
375
466
/// <param name="autoDelete">Should this queue be auto-deleted when its last consumer (if any) unsubscribes?</param>
376
467
/// <param name="arguments">Optional; additional queue arguments, e.g. "x-queue-type"</param>
377
- ValueTask < QueueDeclareOk > QueueDeclareAsync ( string queue , bool durable , bool exclusive , bool autoDelete , IDictionary < string , object > arguments ) ;
468
+ ValueTask < QueueDeclareOk > QueueDeclareAsync ( string queue , bool passive , bool durable , bool exclusive , bool autoDelete , IDictionary < string , object > arguments ) ;
378
469
379
470
/// <summary>
380
471
/// Declares a queue. See the <a href="https://www.rabbitmq.com/queues.html">Queues guide</a> to learn more.
@@ -411,17 +502,30 @@ ValueTask BasicPublishAsync<TProperties>(CachedString exchange, CachedString rou
411
502
uint ConsumerCount ( string queue ) ;
412
503
413
504
/// <summary>
414
- /// Delete a queue.
505
+ /// Deletes a queue. See the <a href="https://www.rabbitmq.com/queues.html">Queues guide</a> to learn more.
506
+ /// </summary>
507
+ /// <param name="queue">The name of the queue.</param>
508
+ /// <param name="ifUnused">Only delete the queue if it is unused.</param>
509
+ /// <param name="ifEmpty">Only delete the queue if it is empty.</param>
510
+ /// <returns>Returns the number of messages purged during deletion.</returns>
511
+ uint QueueDelete ( string queue , bool ifUnused , bool ifEmpty ) ;
512
+
513
+ /// <summary>
514
+ /// Asynchronously deletes a queue. See the <a href="https://www.rabbitmq.com/queues.html">Queues guide</a> to learn more.
415
515
/// </summary>
416
516
/// <remarks>
417
517
///Returns the number of messages purged during queue deletion.
418
518
/// </remarks>
419
- uint QueueDelete ( string queue , bool ifUnused , bool ifEmpty ) ;
519
+ ValueTask < uint > QueueDeleteAsync ( string queue , bool ifUnused , bool ifEmpty ) ;
420
520
421
521
/// <summary>
422
522
///Same as QueueDelete but sets nowait parameter to true
423
523
///and returns void (as there will be no response from the server)
424
524
/// </summary>
525
+ /// <param name="queue">The name of the queue.</param>
526
+ /// <param name="ifUnused">Only delete the queue if it is unused.</param>
527
+ /// <param name="ifEmpty">Only delete the queue if it is empty.</param>
528
+ /// <returns>Returns the number of messages purged during deletion.</returns>
425
529
void QueueDeleteNoWait ( string queue , bool ifUnused , bool ifEmpty ) ;
426
530
427
531
/// <summary>
0 commit comments