@@ -47,6 +47,7 @@ public final class AMQPChannel: Sendable {
47
47
/// - code: Any number - might be logged by the server.
48
48
/// - Returns: EventLoopFuture waiting for close response.
49
49
@discardableResult
50
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
50
51
public func close( reason: String = " " , code: UInt16 = 200 ) -> EventLoopFuture < Void > {
51
52
return channel. send ( payload: . method( . channel( . close( . init( replyCode: code, replyText: reason, classID: 0 , methodID: 0 ) ) ) ) )
52
53
. flatMapThrowing { response in
@@ -76,6 +77,7 @@ public final class AMQPChannel: Sendable {
76
77
/// DeliveryTag is 0 when channel is not in confirm mode.
77
78
/// DeliveryTag is > 0 (monotonically increasing) when channel is in confirm mode.
78
79
@discardableResult
80
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
79
81
public func basicPublish(
80
82
from body: ByteBuffer ,
81
83
exchange: String ,
@@ -121,6 +123,7 @@ public final class AMQPChannel: Sendable {
121
123
/// - queue: Name of the queue.
122
124
/// - noAck: Controls whether message will be acked or nacked automatically (true) or manually (false).
123
125
/// - Returns: EventLoopFuture with optional message when queue is not empty.
126
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
124
127
public func basicGet( queue: String , noAck: Bool = false ) -> EventLoopFuture < AMQPResponse . Channel . Message . Get ? > {
125
128
return channel. send ( payload: . method( . basic( . get( . init( reserved1: 0 , queue: queue, noAck: noAck) ) ) ) )
126
129
. flatMapThrowing { response in
@@ -141,6 +144,7 @@ public final class AMQPChannel: Sendable {
141
144
/// - listener: Callback when Delivery arrives - automatically registered.
142
145
/// - Returns: EventLoopFuture with response confirming that broker has accepted consume request.
143
146
@discardableResult
147
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
144
148
public func basicConsume(
145
149
queue: String ,
146
150
consumerTag: String = " " ,
@@ -184,6 +188,7 @@ public final class AMQPChannel: Sendable {
184
188
/// - Parameters:
185
189
/// - consumerTag: Identifer of the consumer.
186
190
/// - Returns: EventLoopFuture waiting for cancel response.
191
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
187
192
public func basicCancel( consumerTag: String ) -> EventLoopFuture < Void > {
188
193
let found : Bool
189
194
@@ -216,6 +221,7 @@ public final class AMQPChannel: Sendable {
216
221
/// - deliveryTag: Number (identifier) of the message..
217
222
/// - multiple: Controls whether only this message is acked (false) or additionally all other up to it (true).
218
223
/// - Returns: EventLoopFuture that will be resolved when ack is sent.
224
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
219
225
public func basicAck( deliveryTag: UInt64 , multiple: Bool = false ) -> EventLoopFuture < Void > {
220
226
return channel. send ( payload: . method( . basic( . ack( deliveryTag: deliveryTag, multiple: multiple) ) ) )
221
227
}
@@ -225,6 +231,7 @@ public final class AMQPChannel: Sendable {
225
231
/// - message: Received message.
226
232
/// - multiple: Controls whether only this message is acked (false) or additionally all other up to it (true).
227
233
/// - Returns: EventLoopFuture that will be resolved when ack is sent.
234
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
228
235
public func basicAck( message: AMQPResponse . Channel . Message . Delivery , multiple: Bool = false ) -> EventLoopFuture < Void > {
229
236
return basicAck ( deliveryTag: message. deliveryTag, multiple: multiple)
230
237
}
@@ -235,6 +242,7 @@ public final class AMQPChannel: Sendable {
235
242
/// - multiple: Controls whether only this message is rejected (false) or additionally all other up to it (true).
236
243
/// - requeue: Controls whether to requeue message after reject.
237
244
/// - Returns: EventLoopFuture that will be resolved when nack is sent.
245
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
238
246
public func basicNack( deliveryTag: UInt64 , multiple: Bool = false , requeue: Bool = false ) -> EventLoopFuture < Void > {
239
247
return channel. send ( payload: . method( . basic( . nack( . init( deliveryTag: deliveryTag, multiple: multiple, requeue: requeue) ) ) ) )
240
248
}
@@ -245,6 +253,7 @@ public final class AMQPChannel: Sendable {
245
253
/// - multiple: Controls whether only this message is rejected (false) or additionally all other up to it (true).
246
254
/// - requeue: Controls whether to requeue message after reject.
247
255
/// - Returns: EventLoopFuture that will be resolved when nack is sent.
256
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
248
257
public func basicNack( message: AMQPResponse . Channel . Message . Delivery , multiple: Bool = false , requeue: Bool = false ) -> EventLoopFuture < Void > {
249
258
return basicNack ( deliveryTag: message. deliveryTag, multiple: multiple, requeue: requeue)
250
259
}
@@ -254,6 +263,7 @@ public final class AMQPChannel: Sendable {
254
263
/// - deliveryTag: Number ((identifier) of the message.
255
264
/// - requeue: Controls whether to requeue message after reject.
256
265
/// - Returns: EventLoopFuture that will be resolved when reject is sent.
266
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
257
267
public func basicReject( deliveryTag: UInt64 , requeue: Bool = false ) -> EventLoopFuture < Void > {
258
268
return channel. send ( payload: . method( . basic( . reject( deliveryTag: deliveryTag, requeue: requeue) ) ) )
259
269
}
@@ -263,6 +273,7 @@ public final class AMQPChannel: Sendable {
263
273
/// - message: Received Message.
264
274
/// - requeue: Controls whether to requeue message after reject.
265
275
/// - Returns: EventLoopFuture that will be resolved when reject is sent.
276
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
266
277
public func basicReject( message: AMQPResponse . Channel . Message . Delivery , requeue: Bool = false ) -> EventLoopFuture < Void > {
267
278
return basicReject ( deliveryTag: message. deliveryTag, requeue: requeue)
268
279
}
@@ -272,6 +283,7 @@ public final class AMQPChannel: Sendable {
272
283
/// - Parameters:
273
284
/// - requeue: Controls whether to requeue all messages after rejecting them.
274
285
/// - Returns: EventLoopFuture waiting for recover response.
286
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
275
287
public func basicRecover( requeue: Bool ) -> EventLoopFuture < Void > {
276
288
return channel. send ( payload: . method( . basic( . recover( requeue: requeue) ) ) )
277
289
. flatMapThrowing { response in
@@ -288,6 +300,7 @@ public final class AMQPChannel: Sendable {
288
300
/// - count: Size of the limit.
289
301
/// - global: Whether the limit will be shared across all consumers on the channel.
290
302
/// - Returns: EventLoopFuture waiting for qos response.
303
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
291
304
public func basicQos( count: UInt16 , global: Bool = false ) -> EventLoopFuture < Void > {
292
305
return channel. send ( payload: . method( . basic( . qos( prefetchSize: 0 , prefetchCount: count, global: global) ) ) )
293
306
. flatMapThrowing { response in
@@ -305,6 +318,7 @@ public final class AMQPChannel: Sendable {
305
318
/// - active: Flow enabled or disabled.
306
319
/// - Returns: EventLoopFuture with response confirming that broker has accepted a flow request.
307
320
@discardableResult
321
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
308
322
public func flow( active: Bool ) -> EventLoopFuture < AMQPResponse . Channel . Flowed > {
309
323
return channel. send ( payload: . method( . channel( . flow( active: active) ) ) )
310
324
. flatMapThrowing { response in
@@ -326,6 +340,7 @@ public final class AMQPChannel: Sendable {
326
340
/// - arguments: Additional arguments (check rabbitmq documentation).
327
341
/// - Returns: EventLoopFuture with response confirming that broker has accepted a request.
328
342
@discardableResult
343
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
329
344
public func queueDeclare(
330
345
name: String ,
331
346
passive: Bool = false ,
@@ -357,6 +372,7 @@ public final class AMQPChannel: Sendable {
357
372
/// - ifEmpty: If enabled queue will be deleted only when it's empty.
358
373
/// - Returns: EventLoopFuture with response confirming that broker has accepted a delete request.
359
374
@discardableResult
375
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
360
376
public func queueDelete( name: String , ifUnused: Bool = false , ifEmpty: Bool = false ) -> EventLoopFuture < AMQPResponse . Channel . Queue . Deleted > {
361
377
return channel. send ( payload: . method( . queue( . delete( . init( reserved1: 0 , queueName: name, ifUnused: ifUnused, ifEmpty: ifEmpty, noWait: false ) ) ) ) )
362
378
. flatMapThrowing { response in
@@ -372,6 +388,7 @@ public final class AMQPChannel: Sendable {
372
388
/// - name: Name of the queue.
373
389
/// - Returns: EventLoopFuture with response confirming that broker has accepted a delete request.
374
390
@discardableResult
391
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
375
392
public func queuePurge( name: String ) -> EventLoopFuture < AMQPResponse . Channel . Queue . Purged > {
376
393
return channel. send ( payload: . method( . queue( . purge( . init( reserved1: 0 , queueName: name, noWait: false ) ) ) ) )
377
394
. flatMapThrowing { response in
@@ -389,6 +406,7 @@ public final class AMQPChannel: Sendable {
389
406
/// - routingKey: Bind only to messages matching routingKey.
390
407
/// - arguments: Bind only to message matching given options.
391
408
/// - Returns: EventLoopFuture waiting for bind response.
409
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
392
410
public func queueBind( queue: String , exchange: String , routingKey: String = " " , args arguments: Table = Table ( ) ) -> EventLoopFuture < Void > {
393
411
return channel. send ( payload: . method( . queue( . bind( . init( reserved1: 0 ,
394
412
queueName: queue,
@@ -411,6 +429,7 @@ public final class AMQPChannel: Sendable {
411
429
/// - routingKey: Unbind only from messages matching routingKey.
412
430
/// - arguments: Unbind only from messages matching given options.
413
431
/// - Returns: EventLoopFuturewaiting for bind response unbind response.
432
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
414
433
public func queueUnbind( queue: String , exchange: String , routingKey: String = " " , args arguments: Table = Table ( ) ) -> EventLoopFuture < Void > {
415
434
return channel. send ( payload: . method( . queue( . unbind( . init( reserved1: 0 ,
416
435
queueName: queue,
@@ -434,6 +453,7 @@ public final class AMQPChannel: Sendable {
434
453
/// - internal: Whether the exchange cannot be directly published to client.
435
454
/// - arguments: Additional arguments (check rabbitmq documentation).
436
455
/// - Returns: EventLoopFuture waiting for declare response.
456
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
437
457
public func exchangeDeclare(
438
458
name: String ,
439
459
type: String ,
@@ -465,6 +485,7 @@ public final class AMQPChannel: Sendable {
465
485
/// - name: Name of the queue.
466
486
/// - ifUnused: If enabled exchange will be deleted only when it's not used.
467
487
/// - Returns: EventLoopFuture waiting for delete response.
488
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
468
489
public func exchangeDelete( name: String , ifUnused: Bool = false ) -> EventLoopFuture < Void > {
469
490
return channel. send ( payload: . method( . exchange( . delete( . init( reserved1: 0 , exchangeName: name, ifUnused: ifUnused, noWait: false ) ) ) ) )
470
491
. flatMapThrowing { response in
@@ -482,6 +503,7 @@ public final class AMQPChannel: Sendable {
482
503
/// - routingKey: Bind only to messages matching routingKey.
483
504
/// - arguments: Bind only to messages matching given options.
484
505
/// - Returns: EventLoopFuture waiting for bind response.
506
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
485
507
public func exchangeBind( destination: String , source: String , routingKey: String , args arguments: Table = Table ( ) ) -> EventLoopFuture < Void > {
486
508
return channel. send ( payload: . method( . exchange( . bind( . init( reserved1: 0 ,
487
509
destination: destination,
@@ -504,6 +526,7 @@ public final class AMQPChannel: Sendable {
504
526
/// - routingKey: Unbind only from messages matching routingKey.
505
527
/// - arguments: Unbind only from messages matching given options.
506
528
/// - Returns: EventLoopFuture waiting for unbind response.
529
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
507
530
public func exchangeUnbind( destination: String , source: String , routingKey: String , args arguments: Table = Table ( ) ) -> EventLoopFuture < Void > {
508
531
return channel. send ( payload: . method( . exchange( . unbind( . init( reserved1: 0 ,
509
532
destination: destination,
@@ -521,6 +544,7 @@ public final class AMQPChannel: Sendable {
521
544
522
545
/// Set channel in publish confirm mode, each published message will be acked or nacked.
523
546
/// - Returns: EventLoopFuture waiting for confirm select response.
547
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
524
548
public func confirmSelect( ) -> EventLoopFuture < Void > {
525
549
guard !isConfirmMode. load ( ordering: . relaxed) else {
526
550
return eventLoop. makeSucceededFuture ( ( ) )
@@ -540,6 +564,7 @@ public final class AMQPChannel: Sendable {
540
564
541
565
/// Set channel in transaction mode.
542
566
/// - Returns: EventLoopFuture waiting for tx select response.
567
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
543
568
public func txSelect( ) -> EventLoopFuture < Void > {
544
569
guard !isTxMode. load ( ordering: . relaxed) else {
545
570
return eventLoop. makeSucceededFuture ( ( ) )
@@ -559,6 +584,7 @@ public final class AMQPChannel: Sendable {
559
584
560
585
/// Commit a transaction.
561
586
/// - Returns: EventLoopFuture waiting for commit response.
587
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
562
588
public func txCommit( ) -> EventLoopFuture < Void > {
563
589
return channel. send ( payload: . method( . tx( . commit) ) )
564
590
. flatMapThrowing { response in
@@ -571,6 +597,7 @@ public final class AMQPChannel: Sendable {
571
597
572
598
/// Rollback a transaction.
573
599
/// - Returns: EventLoopFuture waiting for rollback response.
600
+ @available ( * , deprecated, message: " EventLoopFuture based public API will be removed in first stable release, please use Async API " )
574
601
public func txRollback( ) -> EventLoopFuture < Void > {
575
602
return channel. send ( payload: . method( . tx( . rollback) ) )
576
603
. flatMapThrowing { response in
0 commit comments