@@ -279,30 +279,48 @@ Once you have written your transport's sender and receiver, you can register you
279279transport factory to be able to use it via a DSN in the Symfony application.
280280
281281Create your Transport Factory
282- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
282+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
283283
284284You need to give FrameworkBundle the opportunity to create your transport from a
285285DSN. You will need an transport factory::
286286
287- use Symfony\Component\Messenger\Transport\Factory\AdapterFactoryInterface;
287+ use Symfony\Component\Messenger\Transport\TransportFactoryInterface;
288+ use Symfony\Component\Messenger\Transport\TransportInterface;
288289 use Symfony\Component\Messenger\Transport\ReceiverInterface;
289290 use Symfony\Component\Messenger\Transport\SenderInterface;
290291
291292 class YourTransportFactory implements TransportFactoryInterface
292293 {
293- public functioncreateReceiver (string $dsn, array $options):ReceiverInterface
294+ public functioncreateTransport (string $dsn, array $options):TransportInterface
294295 {
295- return newYourReceiver (/* ... */);
296+ return newYourTransport (/* ... */);
296297 }
297298
298- public functioncreateSender (string $dsn, array $options):SenderInterface
299+ public functionsupports (string $dsn, array $options):bool
299300 {
300- returnnew YourSender(/* ... */ );
301+ return0 === strpos($dsn, 'my-transport://' );
301302 }
303+ }
302304
303- public function supports(string $dsn, array $options): bool
305+ The transport object is needs to implements the ``TransportInterface `` (which simply combine
306+ the ``SenderInterface `` and ``ReceiverInterface ``). It will look
307+ like this::
308+
309+ class YourTransport implements TransportInterface
310+ {
311+ public function send($message) : void
304312 {
305- return 0 === strpos($dsn, 'my-transport://');
313+ // ...
314+ }
315+
316+ public function receive(callable $handler) : void
317+ {
318+ // ...
319+ }
320+
321+ public function stop() : void
322+ {
323+ // ...
306324 }
307325 }
308326