Skip to content

When using MysqlMQ messages are always set to complete even if exception occurs #18140

Closed
@php4umagento

Description

@php4umagento

Preconditions (*)

  1. Magento 2.3 and 2.4-develop
  2. Using mysql mq driver to work with the queue

Steps to reproduce (*)

  1. Publish any message to the queue
  2. In the consumer throw Exception

Expected result (*)

1.Message should be flagged as error in the queue

Actual result (*)

  1. Message is set to complete and ACK

Problem is here -

When exception happens in the Consumer message is flagged as error here
https://github.com/magento/magento2/blob/2.4-develop/lib/internal/Magento/Framework/MessageQueue/Consumer.php#L229

but then this status is overwritten by

https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/MysqlMq/Model/Driver/Queue.php#L114

Metadata

Metadata

Assignees

Labels

CDIssue recommended for the contribution dayComponent: BackendEvent: dmcdindia2020Fixed in 2.2.xThe issue has been fixed in 2.2 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S1Affects critical data or functionality and forces users to employ a workaround.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions