Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Messenger][Amqp] Add config option 'arguments' for delay queues #48603

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

Merged

Conversation

thomasbeaujean
Copy link

@thomasbeaujean thomasbeaujean commented Dec 11, 2022

Q A
Branch? 6.3
Bug fix? no
New feature? yes
Deprecations? no
Tickets Fix #44186 #46254
License MIT
Doc PR symfony/symfony-docs#17553

Hi, this PR to allow to add extra arguments to the amqp delay queues that are automatically created.

The use case:

  • I do not know in advance the name of the queues (handled by env variables)
  • The queues are created automatically by symfony if needed
  • I need the deduplication plugin in both the queue and the associated delays queues (enabled with the x-message-deduplication argument)
  • I do not want to rewrite all delay arguments, I just want to be able to add or rewrite some

The associated configuration in messenger.yaml

        transports:
            async:
                dsn: '%env(MESSENGER_DSN)%'
                options:
                    queues:
                        '%env(MESSENGER_ASYNC_QUEUE_NAME)%':
                            arguments:
                                x-queue-type: 'classic'
                                x-message-deduplication: true
                    delay:
                        arguments:
                            x-queue-type: 'classic'
                            x-message-deduplication: true

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.3 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot
Copy link

Hey!

I think @deguif has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@nicolas-grekas nicolas-grekas modified the milestones: 6.3, 6.4 May 23, 2023
@maryo
Copy link
Contributor

maryo commented Jan 20, 2024

Hello. Is someting preventing this to be merged? Is it the minor code review comment? I could change it by creating another fork but in my opinion both versions are fine.

@thomasbeaujean thomasbeaujean force-pushed the amqp-connection-delay-arguments branch 3 times, most recently from fc7d7ed to 5182c26 Compare January 22, 2024 22:10
@thomasbeaujean
Copy link
Author

Hi, @maxbeckers, this PR has been opened for long time, could tell me if this is ok for you ?

@nicolas-grekas nicolas-grekas changed the title [Messenger] Add config option 'arguments' for delay queues [Messenger][Amqp] Add config option 'arguments' for delay queues Feb 7, 2024
@nicolas-grekas nicolas-grekas force-pushed the amqp-connection-delay-arguments branch from 5182c26 to 94ee8a2 Compare February 7, 2024 07:53
@nicolas-grekas
Copy link
Member

Thank you @thomasbeaujean.

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.

[Messenger] [AMQP] Add arguments to delay queues
5 participants