symfonyapache-kafkasymfony5symfony-messenger

Symfony 5.4 with Kafka


I have a symfony 5.4 project and I want to implement kafka with the symfony messenger component.

I've seen several ways to do this, including this post: Symfony Messenger with Apache Kafka as queue transport which implements 4 bundles (all essential?), a bundle https://github.com/KonstantinCodes/messenger-kafka, I'm not sure what best practice to implement. In the official Symfony documentation, I only found this line: https://symfony.com/doc/current/messenger.html#transports-async-queued-messages If you have any feedback, I'd love to hear it :)


Solution

  • Here is what's available on the symfony/messenger documentation:

    If you want to use a transport that's not supported, check out the Enqueue's transport, which supports things like Kafka and Google Pub/Sub.

    source: https://symfony.com/doc/current/messenger.html#transports-async-queued-messages

    So yes, you need all those dependencies.

    What happens is that you configure symfony/messenger to use the enqueue driver, which in terms uses kafka.