Open bendavies opened 6 months ago
I've done this by creating a ProcessedMessageRepository
and by creating a custom sql query. But it requires some customisation.
Note: I am using PostgreSQL, when using MySQL the statements are different.
...
$sql = $connection->createQueryBuilder()
->from('processed_message', 'm')
->select('m.message_type')
->addSelect('COUNT(m.id) as total_amount')
->addSelect(sprintf('AVG(%s) AS average_waiting_time', sprintf('extract(epoch from (%s - %s))', 'received_at', 'dispatched_at')))
->addSelect(sprintf('AVG(%s) AS average_handling_time', sprintf('extract(epoch from (%s - %s))', 'finished_at', 'received_at')))
->groupBy('m.message_type')
->getSQL()
;
$statement = $connection->executeQuery($sql);
...
Thanks for posting your solution - this is indeed a great feature!
Hi Kevin!
We're looking at moving from https://github.com/SymfonyCasts/messenger-monitor-bundle/ to this bundle.
One screen we like in the above is the displaying a table of
Per message type statistics
like this:Does this bundle have a similar screen? (I couldn't see one)
Thanks!