Skip to content

RabbitMQ reject doesn't work on consumer exception #32670

Open
@madonzyaccenture

Description

@madonzyaccenture

Preconditions (*)

  1. Magento 2.3.3

Steps to reproduce (*)

  1. Run any bulk WEBAPI import
  2. Start the consumer
  3. Within consumer throw an exception

Expected result (*)

  1. Message should returned to the queue

Actual result (*)

  1. 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
image
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions