Skip to content
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

[Messenger] Make sure redis transports are initialized correctly #36449

Merged
merged 1 commit into from Apr 14, 2020

Conversation

Seldaek
Copy link
Member

@Seldaek Seldaek commented Apr 14, 2020

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets
License MIT

Took me a while to figure out why my messages were dispatched/handled twice.. Turns out I had two messenger transports using the same dsn and the parsing was broken so they ended up both polling from a "" stream, which caused them to both handle the messages (I think).

Below my config, note the trailing slash in the dsn was the root cause of the issue, but I don't think it's that unreasonable.

.env:

MESSENGER_TRANSPORT_DSN=redis://localhost:6379/?dbindex=3


messenger.yml:

            async_urgent:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options:
                    group: async_urgent
                    stream: messages_urgent
            async:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                options:
                    group: async
                    stream: messages

@chalasr chalasr added this to the 4.4 milestone Apr 14, 2020
@chalasr
Copy link
Member

chalasr commented Apr 14, 2020

Can you apply fabbot’s patch?

@Seldaek
Copy link
Member Author

Seldaek commented Apr 14, 2020

Yup done sorry I didn't see the failure.

@chalasr
Copy link
Member

chalasr commented Apr 14, 2020

Good catch, thanks @Seldaek.

@chalasr chalasr merged commit efb0dee into symfony:4.4 Apr 14, 2020
This was referenced Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants