3

When trying to configure symfony messenger always getting error No transport supports the given Messenger DSN "doctrine://default".

symfony framework: 4.3.4

messenger: 4.3.0

In this application only doctrine-bundle & symfony-messenger is installed.

doctrine:

doctrine:
    dbal:
        default_connection: default
        connections:
            default:
                schema_filter: '~^(?!messenger_messages)~'
                dbname: sftest
                host: 127.0.0.1
                port: ~
                user: root
                password: ~
                charset: "UTF8"
                driver: 'pdo_mysql'
                server_version: '5.7'
                default_table_options:
                    charset: utf8mb4
                    collate: utf8mb4_unicode_ci

messenger:

framework:
  messenger:
    transports:
      async: doctrine://default
    routing:
      'App\Entity\Notification': async
EdvinasPocius
  • 173
  • 2
  • 10
  • have you set it up? https://symfony.com/doc/current/messenger.html#doctrine-transport – Jakumi Sep 08 '19 at 08:10
  • @Jakumi I have read this documentation a couple of times and do not see what's missing from mine configuration. – EdvinasPocius Sep 08 '19 at 08:14
  • what I'm asking is: does the table in the database exist? – Jakumi Sep 08 '19 at 08:14
  • no, the table doesn't exist in the database. – EdvinasPocius Sep 08 '19 at 08:16
  • I wouldn't expect it, but maybe a message as well as a handler is required for this to work ... which you might already have? (https://symfony.com/doc/current/messenger.html#creating-a-message-handler) – Jakumi Sep 08 '19 at 08:32
  • There is a message, handler and dispatcher created. It works fine when the message is consumed immediately - no errors occur – EdvinasPocius Sep 08 '19 at 08:35
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/199135/discussion-between-jakumi-and-edvinaspocius). – Jakumi Sep 08 '19 at 08:35

1 Answers1

4

So the problem was that symfony messenger require doctrine orm, and I only was using symfony dbal.

EdvinasPocius
  • 173
  • 2
  • 10