Skip to content

How can I use the Symfony Bundle with Kafka? #428

Closed

Description

@dergriewatz

When I try this transport layer configuration:

# app/config/config.yml

enqueue:
    transport:
        default: "kafka:"
    client: ~

I get this Exception:

In DefaultTransportFactory.php line 212:

  [LogicException]
  There is no supported transport factory for the connection factory "Enqueue\RdKafka\RdKafkaConnectionFactory" created from DSN "kafka:"

Exception trace:
 Enqueue\Symfony\DefaultTransportFactory->findFactory() at vendor/enqueue/enqueue/Symfony/DefaultTransportFactory.php:82
 Enqueue\Symfony\DefaultTransportFactory->createConnectionFactory() at vendor/enqueue/enqueue-bundle/DependencyInjection/EnqueueExtension.php:76
 Enqueue\Bundle\DependencyInjection\EnqueueExtension->load() at vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php:71
 Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass->process() at vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php:39
 Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass->process() at vendor/symfony/dependency-injection/Compiler/Compiler.php:95
 Symfony\Component\DependencyInjection\Compiler\Compiler->compile() at vendor/symfony/dependency-injection/ContainerBuilder.php:713
 Symfony\Component\DependencyInjection\ContainerBuilder->compile() at vendor/symfony/http-kernel/Kernel.php:513
 Symfony\Component\HttpKernel\Kernel->initializeContainer() at vendor/symfony/http-kernel/Kernel.php:125
 Symfony\Component\HttpKernel\Kernel->boot() at vendor/symfony/framework-bundle/Console/Application.php:64
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at vendor/symfony/console/Application.php:143
 Symfony\Component\Console\Application->run() at bin/console:39

Activity

  1. makasim commented on Apr 24, 2018

    @makasim
    Member
    $ composer req enqueue/rdkafka
  2. dergriewatz commented on Apr 24, 2018

    @dergriewatz
    Author

    It's already installed.

    # composer.json
    {
        ...
        "require": {
            "enqueue/enqueue-bundle": "^0.8.25",
            "enqueue/rdkafka": "^0.8.23",
            ...
        },
        ...
    }
    
  3. makasim commented on Apr 24, 2018

    @makasim
    Member
  4. dergriewatz commented on Apr 24, 2018

    @dergriewatz
    Author

    I only found the Enqueue\RdKafka\RdKafkaConnectionFactory that implements the PsrConnectionFactory interface.
    But when I see it right I need a Enqueue\RdKafka\Symfony\RdKafkaTransportFactory or similar that implements the TransportFactoryInterface and DriverFactoryInterface.
    Is there already something like that?

  5. makasim commented on Apr 24, 2018

    @makasim
    Member

    It's not been implemented.

  6. dergriewatz commented on Apr 24, 2018

    @dergriewatz
    Author

    Okay thanks. I try to implement it and make a PR.

  7. makasim commented on Apr 27, 2018

    @makasim
    Member

    Closing as there is PR #432

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions