What is the meaning of different Message Queue Status code in Magento 2?

Magento uses asynchronous operation for managing MySQL implementation of the message queue.

Magento stores queue status in the queue_message_status table to manage the relation between queues and messages.

In the table, column status defines the status of the message queues.

There are different message statuses available in Magento to identify the status of the message.  QueueManagement class is used to manage message queues in the system.

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.