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
being hit which looks like thread blocking.
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) ?
It looks like explicit
nackcan be used only synchronously and the only way to use it asynchronously is by supplying it as an implicit default RecoveryStrategy forBoundConsumerDefinition(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 toop-rabbit/core/src/main/scala/com/spingo/op_rabbit/impl/AsyncAckingRabbitConsumer.scala
Line 179 in ff9f8a2
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) ?