-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using MysqlMQ messages are always set to complete even if exception occurs #18140
Comments
Hi @php4umagento. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
where @php4umagento do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @engcom-backlog-nazar. Thank you for working on this issue.
|
@engcom-backlog-nazar Thank you for verifying the issue. Based on the provided information internal tickets |
The issue still exists in 2.3.2, the only thing needed to fix it is to update the lock resource /**
* {@inheritDoc}
*/
public function saveLock(\Magento\Framework\MessageQueue\LockInterface $lock)
{
$object = $this->lockFactory->create();
$object->setMessageCode($lock->getMessageCode());
$object->setCreatedAt($this->dateTime->gmtTimestamp());
$object->save();
// After save we set lock id to lock object
$lock->setId($object->getId());
} |
Hi @engcom-Charlie. Thank you for working on this issue.
|
✅ Confirmed by @engcom-Charlie Issue Available: @engcom-Charlie, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
@magento I am working on this |
Hi @vdubyna, can I add this line and give a PR? Will it resolve the issue? |
Hi @engcom-Golf. Thank you for working on this issue.
|
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
1.Message should be flagged as error in the queue
Actual result (*)
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
The text was updated successfully, but these errors were encountered: