Skip to content

Add backlog quota configuration on topic - #2659

Closed
codelipenghui wants to merge 7 commits into
apache:masterfrom
codelipenghui:topic-policy-backlog-quota
Closed

Add backlog quota configuration on topic#2659
codelipenghui wants to merge 7 commits into
apache:masterfrom
codelipenghui:topic-policy-backlog-quota

Conversation

@codelipenghui

Copy link
Copy Markdown
Contributor

Motivation

Support set backlog quota on topic level.

Modifications

Support get-backlog-quotas on topic level.
Support set-backlog-quota on topic level.
Support remove-backlog-quota on topic level.

Results

If set backlog quota on a topic, backlog policy will use the backlog quota setting on topic, otherwise back to use backlog quota setting on namespace which topic belong to.

@merlimat

Copy link
Copy Markdown
Contributor

I think we should also try to think of a more general approach for this problem.

Right now, the only per-topic policy override is for the authorization settings. While is good to add backlog retention override, in future we might need to add more for each policy tunable.

For sake of setting a format in the policies metadata, we could have a map with all the per-topic overrides that can support all the available policies.

Then we can kind of reuse the same code for setting specific policies on the namespace, to apply also for the single topic case.

@sijie

sijie commented Sep 26, 2018

Copy link
Copy Markdown
Member

@merlimat:

regarding the context of this change, @codelipenghui has identified the policies can be overridden at topic level. and he is working on adding those policies to topic level. I believe that is his first change.

regarding the approach for topic level policy, are you suggesting making a more general approach? Can you describe more about your suggested approach? It is a bit unclear to me how this can be made with a general map.

@codelipenghui

codelipenghui commented Sep 27, 2018

Copy link
Copy Markdown
Contributor Author

Following configurations can overwrite in topic level:

  • 1. MessageTTL [Get, Set]
  • 2. Retention Policy [Get, Set]
  • 3. Message Dispatch Rate [Get, Set]
  • 4. Backlog Quota [Get, Set, Remove, Clear Backlog]
  • 5. Persistence Policy [Get, Set]
  • 6. Max Producer [Get, Set]
  • 7. Max Consumer [Get, Set]
  • 8. Compaction Threshold [Get, Set]
  • 9. Offload Threshold [Get, Set]
  • 10. Deduplication [Set]
  • 11. Offload Deletion Lag [Get, Set]

Should we need a issue to tracker them.

@sijie

sijie commented Sep 27, 2018

Copy link
Copy Markdown
Member

@codelipenghui yes. let's create an issue as a master issue for tracking the support of topic-level policies.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, copy the namespace policy as the topic policy. I think no need to copy the namespace policy, just set current configuration to the topic policy, otherwise change the namespace policy can't affect topics which has it's local policy(copy from the namespace before).

@codelipenghui

Copy link
Copy Markdown
Contributor Author

#2688 This is the master ticket to tracking this PR

@codelipenghui codelipenghui mentioned this pull request Oct 1, 2018
14 tasks
@sijie

sijie commented Oct 3, 2018

Copy link
Copy Markdown
Member

@merlimat can you spend some time reviewing this?

@sijie
sijie requested a review from ivankelly October 3, 2018 21:40
@sijie sijie added this to the 2.4.0 milestone Dec 27, 2018
@jiazhai

jiazhai commented Jan 28, 2019

Copy link
Copy Markdown
Member

it seems that this PR would need address system topic first.

@codelipenghui codelipenghui removed this from the 2.4.0 milestone May 22, 2019
@codelipenghui
codelipenghui force-pushed the topic-policy-backlog-quota branch from 5a226f2 to df62825 Compare August 5, 2019 09:28
@codelipenghui

Copy link
Copy Markdown
Contributor Author

@sijie @jiazhai I have rebase this pr and add options to enable or disable topic level policy, default is disabled. Please help review these changes.

@codelipenghui codelipenghui added this to the 2.5.0 milestone Aug 5, 2019
@codelipenghui

Copy link
Copy Markdown
Contributor Author

run java8 tests
run integration tests

@codelipenghui

Copy link
Copy Markdown
Contributor Author

run java8 tests

@codelipenghui

Copy link
Copy Markdown
Contributor Author

Close via #7646

@codelipenghui
codelipenghui deleted the topic-policy-backlog-quota branch August 3, 2020 13:37
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.

4 participants