Magento 使用异步操作来管理消息队列的 MySQL 实现。
Magento 将队列状态存储在queue_message_status表中,以管理队列和消息之间的关系。
在表中,列状态定义了消息队列的状态。
Magento 中有不同的消息状态可用于识别消息的状态。QueueManagement 类用于管理系统中的消息队列。
const MESSAGE_STATUS_NEW = 2;
const MESSAGE_STATUS_IN_PROGRESS = 3;
const MESSAGE_STATUS_COMPLETE= 4;
const MESSAGE_STATUS_RETRY_REQUIRED = 5;
const MESSAGE_STATUS_ERROR = 6;
const MESSAGE_STATUS_TO_BE_DELETED = 7;
- If you see the status value equals 2 in the queue_message_status table, the message is just generated and the status type new.
- Message Status 3 indicates in progress but not yet completed.
- Message Status 4 indicates processed and completed.
- Message Status 5 indicates retry required and not completed yet.
- Message Status 6 indicates having some error.
- Message Status 7 indicates to be deleted.