'Symfony Messenger (Messages Queue), ho to get queue status?

I am approaching Symfony 4.4 Message Queue with the Doctrine Transport.

How can I get an overall view of the queue status?

I noticed that Doctrine stores the queue in the table messenger_messages, obviously I could query this table to get this info, but I'm sure that Symfony has a native way to get the queue status.

I would like to get:

  • the number of messages in the queue
  • the number of messages that are in handling in this moment


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source