Description
Preconditions (*)
- Magento 2.3.3
Steps to reproduce (*)
- Run any bulk WEBAPI import
- Start the consumer
- Within consumer throw an exception
Expected result (*)
- Message should returned to the queue
Actual result (*)
- Message was not returned to the queue, thus lost
Here is a code that explains that if an exception was thrown, then reject the message: vendor/magento/module-asynchronous-operations/Model/MassConsumerEnvelopeCallback.php:120
I found that requeue argument is set to false, so I manually changed it to true for test purposes. The message was not requeued as well.
If that is expected behavior, please tell me how can I manipulate basic_ack and basic_nack/basic_reject within consumers? I also posted the question on StackOverflow: https://magento.stackexchange.com/questions/335005/magento-2-rabbitmq-ack-or-reject-message/335023#335023
Note: Either I set requeue as true or false the behaviour is same. Exceptions, don't get requeue whether requeue variable is set as true. Please Fix the implementation of requeue argument under reject method