rabbitmq: RPC Consumer behavior not consistent with consumerOptions.noAck
I have a use case for which I would like to disable acking requirements for some queues.
I tried passing queueOptions: { consumerOptions: { noAck: true } } to the RabbitRPC decorator and the consumer is properly created with no ack requirement, however the consumer logic in AmqpConnection still tries to ack the message after executing the handler. This triggers an error as Rabbit cannot accept an ack in this situation, and it crashes the channel with :
Error: Channel closed by server: 406 (PRECONDITION-FAILED) with message "PRECONDITION_FAILED - unknown delivery tag 5"
I think either the noAck option should not be available, or (preferably) the logic in AmqpConnection.setupRpcChannel should not try to ack nor nack when noAck is true. I tried such a fix in my fork, is this open to contribution ?
Cheers
@y-nk Are you able to help wit this question? I haven't used it for awhile but you seem to be actively using
As i remember your subscriber needs to return the NoAck value to make it happen. I don't think there's a setting to make it default.
try to add return NoAck (with the proper import and it should work)