sroze / messenger-enqueue-transport

Uses Enqueue with Symfony's Messenger component.
MIT License
191 stars 55 forks source link

Symfony 4.3 - No transport supports the given Messenger DSN "enqueue://default" #73

Closed lsv closed 5 years ago

lsv commented 5 years ago

Im running my command

bin/console messenger:consume amqp

But Im getting this error

In TransportFactory.php line 42:

No transport supports the given Messenger DSN "enqueue://default".

Everything worked perfect in Symfony 4.2

# messenger.yaml
framework:
    messenger:
        transports:
            amqp: enqueue://default

        routing:
            '*': amqp
# enqueue.yaml (with my database connection)
enqueue:
    default:
        transport: '%env(resolve:DATABASE_URL)%'
        client: ~
"enqueue/dbal": "^0.9.8",
"enqueue/enqueue-bundle": "^0.9.8",
"sroze/messenger-enqueue-transport": "^0.3.0",
"symfony/messenger": "4.3.*",
KonstantinCodes commented 5 years ago

This fixed it for me: in config/bundles.php add this at the end of the array:

Enqueue\MessengerAdapter\Bundle\EnqueueAdapterBundle::class => ['all' => true],

@sroze can you do this automatically plz?

devrck commented 5 years ago

I think you have to allow the community recipe when you install it: https://github.com/symfony/recipes-contrib/tree/master/enqueue/messenger-adapter

dominikhajduk commented 5 years ago

@devrck thanks for tip but looks like "enqueue/messenger-adapter" is not compatible with "symfony/messenger": "4.3.*", and abandoned. So recipe for this package will not be used. Solution from @KonstantinCodes works for me as well.

lsv commented 5 years ago

yep the @KonstantinCodes fix also worked for me

weaverryan commented 5 years ago

Fixed at https://github.com/symfony/recipes-contrib/pull/692 - but it might need a force merge from someone on the core team.

weaverryan commented 5 years ago

New recipe is merged - manually enabling the bundle should no longer be needed.

Thanks for the report and the debugging!

dominikhajduk commented 5 years ago

Tested and works fine. Thanks @weaverryan.