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] [WIP][Keepalive] keepaliveInterval from KeepaliveReceiverInterface#59238

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
lukasz-falda wants to merge1 commit intosymfony:7.4
base:7.4
Choose a base branch
Loading
fromlukasz-falda:keepalive-iterval-for-keepalive-receiver-interface

Conversation

lukasz-falda
Copy link

@lukasz-faldalukasz-falda commentedDec 17, 2024
edited
Loading

QA
Branch?7.3
Bug fix?no
New feature?yes
Deprecations?no
LicenseMIT

TODO:

  • write PR description
  • fix tests
  • write tests
  • update CHANGELOG.md
  • submit changes to the documentation

Allow to retrieve alarm interval by receiver next to command option

For now we have to pass--keepalive option to ConsumeMessagesCommand and FailedMessagesRetryCommand to set alarm interval for application. But \AMQPQueue and amqp transport hasheartbeat option. Will be nice to allow manage the keepalive interval by receiver so we can use this option and adjust alarm interval automatically by transport (maybe I will make another PR for AmqpTransport, I am working on this).

To achieve this I propose to use (new in 7.2) interface KeepaliveReceiverInterface and get keepalive interval from it. If--keepalive option was already been passed by command we shouldn't change it. Command option should be more important.

(this is my first PR in Symfony, so if I need to do anything more for now, please let me know)

@carsonbot
Copy link

Hey!

To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done?

Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review.

Cheers!

Carsonbot

@lukasz-faldalukasz-falda changed the title[Messenger][Keepalive] getKeepaliveInterval for KeepaliveReceiverInte…[WIP][Messenger][Keepalive] getKeepaliveInterval for KeepaliveReceiverInte…Dec 17, 2024
@lukasz-faldalukasz-falda marked this pull request as ready for reviewDecember 17, 2024 15:58
@carsonbotcarsonbot added this to the7.3 milestoneDec 17, 2024
@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 title[WIP][Messenger][Keepalive] getKeepaliveInterval for KeepaliveReceiverInte…[Messenger] [WIP][Keepalive] getKeepaliveInterval for KeepaliveReceiverInte…Dec 17, 2024
@lukasz-faldalukasz-falda changed the title[Messenger] [WIP][Keepalive] getKeepaliveInterval for KeepaliveReceiverInte…[Messenger] [WIP][Keepalive] keepaliveInterval from KeepaliveReceiverInterfaceDec 18, 2024
@valtzu
Copy link
Contributor

As I understand the issue with this solution is that sinceSIGALRM is global, if with a singlemessenger:consume I was consuming 2 keepalive transports which both set different keepalive intervals, it would not work as intended.

@lukasz-falda
Copy link
Author

if with a single messenger:consume I was consuming 2 keepalive transports which both set different keepalive intervals, it would not work as intended.

With$minSeconds = min($minSeconds ?? $keepaliveInterval, $keepaliveInterval); we set a minimum value of all transports.
So if one transport return 5 seconds, other 10 seconds we set 5 seconds as interval.
I think this is great. If I set it manually via “--keepalive” I would also set the minimum of these values. And even if not, the proposed solution prefers “--keppalive” option so I can overwrite the values from transports at any time.

Could you go into more detail about the possible risks?

@fabpotfabpot modified the milestones:7.3,7.4May 26, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
7.4
Development

Successfully merging this pull request may close these issues.

4 participants
@lukasz-falda@carsonbot@valtzu@fabpot

[8]ページ先頭

©2009-2025 Movatter.jp