Symfony Messenger
PHP

Symfony Messenger helps applications send and receive messages. Integrating Blackfire with Symfony Messenger lets you monitor your Message Handlers and track individual message processing:

You must, first, enable monitoring on your environment.

Add Blackfire PHP SDK as a dependency in your project (1.27+ version).

The Blackfire PHP SDK provides a Symfony Messenger middleware that eases collecting and measuring the processing of your messages:

1
2
3
4
5
6
7
8
9
framework:
  messenger:
    buses:
      messenger.bus.default:
        middleware:
          - 'Blackfire\Bridge\Symfony\MonitoredMiddleware'

services:
  Blackfire\Bridge\Symfony\MonitoredMiddleware: ~

A transaction name is generated for every processed message given the class name of the message. It allows monitoring of consumers given message types.

Transactions are visible on the Monitoring dashboard page, filtering on CLI requests.