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

Have minimum queue TTL take effect for quorum queues #10949

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ansd
Copy link
Member

@ansd ansd commented Apr 9, 2024

For classic queues, if both policy and queue argument are set for queue TTL, the minimum takes effect.

Prior to this commit, for quorum queues if both policy and queue argument are set for queue TTL, the policy always overrides the queue argument.

This commit brings the quorum queue queue TTL resolution to classic queue's behaviour. This allows developers to provide a custom lower queue TTL while the operator policy acts an upper bound safe-guard.

@ansd ansd marked this pull request as draft April 9, 2024 10:55
@michaelklishin michaelklishin added this to the 4.0.0 milestone Apr 9, 2024
@michaelklishin
Copy link
Member

This is also consistent with how the regular policy vs. operator policy tie break works for limits such as TTL and queue length limits: the lower (and safer w.r.t. resource use) wins.

@ansd
Copy link
Member Author

ansd commented Apr 9, 2024

merge_policy_value(<<"expires">>, Val, OpVal) -> min(Val, OpVal);

For classic queues, if both policy and queue argument are set
for queue TTL, the minimum takes effect.

Prior to this commit, for quorum queues if both policy and
queue argument are set for queue TTL, the policy always overrides the
queue argument.

This commit brings the quorum queue queue TTL resolution to classic
queue's behaviour. This allows developers to provide a custom lower
queue TTL while the operator policy acts an upper bound safe-guard.
@ansd ansd marked this pull request as ready for review May 16, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants