Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Messenger] Rabbitmq delayed quorum queues#60298

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
miquel-angel wants to merge6 commits intosymfony:7.2
base:7.2
Choose a base branch
Loading
frommiquel-angel:rabbitmq-delayed-quorum-queues

Conversation

miquel-angel
Copy link

@miquel-angelmiquel-angel commentedApr 29, 2025
edited by OskarStark
Loading

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#57867
LicenseMIT
Docs PRsymfony/symfony-docs#20925

As described in the issue:#57867 when we create delayed quorum queues this doesn't update the expire time.
I've first tried what is suggested by rabbit maintainers here:rabbitmq/rabbitmq-server#5894 (comment) but it doesn't supported either.
So the final solution is create a delayed quorum queue per day, with expire of one day + ttl + 10 seconds, with this approach, when you enqueue a message to a delayed queue, you'll be sure that all the delayed message of the same day will be in the same queue and this queue won't die before the last message is processed.
For example you delay a message with 10s delay at 10:00 of 2025-04-29, this will create a delayed queue named:
delay_test_test_delay_2025-04-29 with expire on 2025-04-30 at 10:10:10.
If another message comes at 23:59:59, it will go to the same queue, that is already created.
And in the next day will create a new queue for the 30th.

@carsonbot
Copy link

Hey!

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

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.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

@carsonbotcarsonbot changed the titleRabbitmq delayed quorum queues[Messenger] Rabbitmq delayed quorum queuesApr 30, 2025
@miquel-angel
Copy link
Author

miquel-angel commentedMay 6, 2025
edited by OskarStark
Loading

I've already done it in a nodeJS project and it works well in production.

asyncfunctioncreateDelayedQueue(channel,exchange,queue,delay){constdate=newDate().toISOString().split('T')[0];constdelayedQueue=`delay_${exchange}_${queue}_${delay}_${date}`;constdelayedExchange='delays';constbaseExpire=24*60*60*1000;awaitchannel.assertQueue(delayedQueue,{durable:true,arguments:{'x-message-ttl':delay,'x-expires':delay+60*1000+baseExpire,'x-dead-letter-exchange':exchange,'x-dead-letter-routing-key':queue,'x-queue-type':'quorum'}});awaitchannel.bindQueue(delayedQueue,delayedExchange,delayedQueue);return{ delayedQueue, delayedExchange};}

@OskarStark
Copy link
Contributor

This probably also affect 6.4, right?

@miquel-angel
Copy link
Author

This probably also affect 6.4, right?

Yes, that's right

@OskarStarkOskarStark modified the milestones:7.2,6.4May 6, 2025
@miquel-angelmiquel-angel changed the base branch from7.2 to6.4May 6, 2025 09:54
@miquel-angelmiquel-angel changed the base branch from6.4 to7.2May 6, 2025 09:54
@miquel-angel
Copy link
Author

Sorry, I've tried to change the base branch to 6.4 and by mistake it has added automatically the reviewers, feel free to leave 🙏
I come back to point to 7.2, as it add a lot of change to the PR, my fault.

@OskarStark
Copy link
Contributor

No worries, we can target 6.4 while merging this PR 👍

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@lyrixxlyrixxAwaiting requested review from lyrixx

@ycerutoycerutoAwaiting requested review from yceruto

@chalasrchalasrAwaiting requested review from chalasr

@dunglasdunglasAwaiting requested review from dunglas

@OskarStarkOskarStarkAwaiting requested review from OskarStark

@jderussejderusseAwaiting requested review from jderusse

@xabbuhxabbuhAwaiting requested review from xabbuh

Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

3 participants
@miquel-angel@carsonbot@OskarStark

[8]ページ先頭

©2009-2025 Movatter.jp