In this example we are using a doctrine transport (the speciality "flow-transport" is a transport which uses the already existing connection to doctrine instead of creating a new one - for the rest of the DSN-Format have a look in the documentation of `symfony/messenger`)
A handler for your CustomMessage could look like this:
```php
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
#[AsMessageHandler]
class CustomMessageHandler
{
public function __invoke(CustomMessage $message)
{
//your code here
}
}
```
It will be automatically found by Flow // the messenger and messages arriving at the bus will be handled by your handler.
Probably you'll want to consume the messengers with long living processes or as a cronjob. The Flow command for that task is `messenger:consume` (more help available)