From 3e29db70fa319965e508f91ebbab1fea515cb0b7 Mon Sep 17 00:00:00 2001 From: Aitor Perez Cedres Date: Wed, 24 Aug 2022 14:30:39 +0100 Subject: [PATCH] Update spec Adding missing constant 302 for no-route error. The spec says that `basic.recover` should be async, but this breaks our test `TestIntegrationRecoverNotImplemented()`. RabbitMQ has deprecated this method and it will be removed in a future release. This commit also adds a deprecation notice to `channel.Recover()`. Signed-off-by: Aitor Perez Cedres --- channel.go | 5 ++ spec/amqp0-9-1.stripped.extended.xml | 27 ++++++---- spec/gen.go | 1 + spec091.go | 78 +++++++++++++++++++++++++++- 4 files changed, 99 insertions(+), 12 deletions(-) diff --git a/channel.go b/channel.go index 1bd32e4..862e57c 100644 --- a/channel.go +++ b/channel.go @@ -1634,6 +1634,11 @@ If the deliveries cannot be recovered, an error will be returned and the channel will be closed. Note: this method is not implemented on RabbitMQ, use Delivery.Nack instead + +Deprecated: This method is deprecated in RabbitMQ. RabbitMQ used Recover(true) +as a mechanism for consumers to tell the broker that they were ready for more +deliveries, back in 2008-2009. Support for this will be removed from RabbitMQ in +a future release. Use Nack() with requeue=true instead. */ func (ch *Channel) Recover(requeue bool) error { return ch.call( diff --git a/spec/amqp0-9-1.stripped.extended.xml b/spec/amqp0-9-1.stripped.extended.xml index fbddb93..1b0a992 100644 --- a/spec/amqp0-9-1.stripped.extended.xml +++ b/spec/amqp0-9-1.stripped.extended.xml @@ -1,4 +1,4 @@ - +