Skip to content

Moving the AMQP exchange from env var to config #608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion symfony/messenger/4.3/config/packages/messenger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ framework:

transports:
# https://symfony.com/doc/current/messenger.html#transports
# async: '%env(MESSENGER_TRANSPORT_DSN)%'
# async: '%env(MESSENGER_TRANSPORT_DSN)%/messages_exchange'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe using ?exchange[name]=messages is more self-explaining. Using the path for the virtual host and exchange is not self-explaining at all.

Copy link
Contributor

@Tobion Tobion Jun 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or using the config options directly below the dsn. this would also make sure that options passed in the dsn would keep working. Something like

async:
    dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
    options:
        exchange:
            name: messages

# failed: 'doctrine://default?queue_name=failed'
# sync: 'sync://'

Expand Down
2 changes: 1 addition & 1 deletion symfony/messenger/4.3/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"env": {
"#1": "Choose one of the transports below",
"#2": "MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages",
"#2": "MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f",
"#3": "MESSENGER_TRANSPORT_DSN=doctrine://default",
"#4": "MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages"
},
Expand Down