-
Notifications
You must be signed in to change notification settings - Fork 71
Description
It looks like explicit nack can be used only synchronously and the only way to use it asynchronously is by supplying it as an implicit default RecoveryStrategy for BoundConsumerDefinition(i.e. the subscription).
So to consume some item asynchronously we should roughly use something like ack(Future{ body_process_result}) . The doc says that if the future fails then the RecoveryStrategy is applied(i.e the wanted nack is called). But this leads to
op-rabbit/core/src/main/scala/com/spingo/op_rabbit/impl/AsyncAckingRabbitConsumer.scala
Line 179 in ff9f8a2
| Await.result( |
Are there any plans to improve this?
And a 2nd question: Is there any other approach to use nack asynchronously besides the approach above(also used in /op-rabbit/core/src/test/scala/com/spingo/op_rabbit/consumerSpec.scala test) ?