Skip to content

Conversation

@MarvinCai
Copy link
Contributor

Motivation

Master Issue: #2688
Add Topic level policy support for message TTL.

Modifications

Support set/get/remove Message TTL on topic level.

Verifying this change

This change added tests and can be verified as follows:

  • Added Unit test to verify set/get/remove message TTL at Topic level work as expected when Topic level policy is enabled/disabled
  • Added test case in PersistentTopicE2ETest to verify Topic level message TTL is used when set and will fall back to namespace message TTL if Topic level message TTL is removed.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API: (no )
  • The schema: (no)
  • The default values of configurations: (no)
  • The wire protocol: (no)
  • The rest endpoints: (yes)
  • The admin cli options: (yes)
  • Anything that affects deployment: (no)

Documentation

  • Does this pull request introduce a new feature? (yes)
  • If yes, how is the feature documented? (JavaDocs)

Add support for message TTL at Topic level using System Topic backed Topic policy.
@sijie sijie requested review from codelipenghui, jiazhai, merlimat, rdhabalia and sijie and removed request for codelipenghui August 4, 2020 04:42
@sijie sijie added this to the 2.7.0 milestone Aug 4, 2020
@sijie sijie added component/topic-policy type/feature The PR added a new feature or issue requested a new feature labels Aug 4, 2020
@codelipenghui codelipenghui mentioned this pull request Aug 4, 2020
14 tasks
@MarvinCai
Copy link
Contributor Author

/pulsarbot run-failure-checks

Improve test stability by trigger namespace bundle load to make sure topic initialized when test case is ran
Similar to what we do for TopicBacklogQuotaTest.

Also added wait time after setup.
@MarvinCai
Copy link
Contributor Author

/pulsarbot run-failure-checks

1 similar comment
@MarvinCai
Copy link
Contributor Author

/pulsarbot run-failure-checks

Copy link
Contributor

@jianyun8023 jianyun8023 left a comment

Choose a reason for hiding this comment

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

You did it very well.👍


@DELETE
@Path("/{tenant}/{namespace}/{topic}/messageTTL")
@ApiOperation(value = "Set message TTL in seconds for a topic")
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove message TTL in seconds for a topic

@codelipenghui codelipenghui added the doc-required Your PR changes impact docs and you will update later. label Aug 5, 2020
Copy link
Contributor

@codelipenghui codelipenghui left a comment

Choose a reason for hiding this comment

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

Looks good to me, please fix the comment that @jianyun8023 mentioned

@MarvinCai
Copy link
Contributor Author

/pulsarbot run-failure-checks

@codelipenghui codelipenghui merged commit 8a763ab into apache:master Aug 6, 2020
huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this pull request Aug 24, 2020
### Motivation
Master Issue: apache#2688
Add Topic level policy support for message TTL.

### Modifications

Support set/get/remove Message TTL on topic level.

### Verifying this change
This change added tests and can be verified as follows:

  - *Added Unit test to verify set/get/remove message TTL at Topic level work as expected when Topic level policy is enabled/disabled*
  - *Added test case in PersistentTopicE2ETest to verify Topic level message TTL is used when set and will fall back to namespace message TTL if Topic level message TTL is removed.*
lbenc135 pushed a commit to lbenc135/pulsar that referenced this pull request Sep 5, 2020
### Motivation
Master Issue: apache#2688
Add Topic level policy support for message TTL.

### Modifications

Support set/get/remove Message TTL on topic level.

### Verifying this change
This change added tests and can be verified as follows:

  - *Added Unit test to verify set/get/remove message TTL at Topic level work as expected when Topic level policy is enabled/disabled*
  - *Added test case in PersistentTopicE2ETest to verify Topic level message TTL is used when set and will fall back to namespace message TTL if Topic level message TTL is removed.*
lbenc135 pushed a commit to lbenc135/pulsar that referenced this pull request Sep 5, 2020
### Motivation
Master Issue: apache#2688
Add Topic level policy support for message TTL.

### Modifications

Support set/get/remove Message TTL on topic level.

### Verifying this change
This change added tests and can be verified as follows:

  - *Added Unit test to verify set/get/remove message TTL at Topic level work as expected when Topic level policy is enabled/disabled*
  - *Added test case in PersistentTopicE2ETest to verify Topic level message TTL is used when set and will fall back to namespace message TTL if Topic level message TTL is removed.*
lbenc135 pushed a commit to lbenc135/pulsar that referenced this pull request Sep 5, 2020
### Motivation
Master Issue: apache#2688
Add Topic level policy support for message TTL.

### Modifications

Support set/get/remove Message TTL on topic level.

### Verifying this change
This change added tests and can be verified as follows:

  - *Added Unit test to verify set/get/remove message TTL at Topic level work as expected when Topic level policy is enabled/disabled*
  - *Added test case in PersistentTopicE2ETest to verify Topic level message TTL is used when set and will fall back to namespace message TTL if Topic level message TTL is removed.*
jiazhai pushed a commit that referenced this pull request Sep 15, 2020
…stence polices, message TTL, and backlog quota on topic level (#7852)

Motivation
In PRs, #7738, #7646, #7817, persistence polices, message TTL, and backlog quota policies are supported on topic level. The PR for code modification is updated and merged. but the doc is not updated accordingly.

This PR is used to support to set/get/remove persistence polices, message TTL, and backlog quota on topic level.

Modifications
Update the Pulsar Admin CLI doc to support to set/get/remove persistence polices, message TTL, and backlog quota on topic level.

* Update backlog-quota policies on topic level

* update contents

* update contents
lbenc135 pushed a commit to lbenc135/pulsar that referenced this pull request Oct 3, 2020
…stence polices, message TTL, and backlog quota on topic level (apache#7852)

Motivation
In PRs, apache#7738, apache#7646, apache#7817, persistence polices, message TTL, and backlog quota policies are supported on topic level. The PR for code modification is updated and merged. but the doc is not updated accordingly.

This PR is used to support to set/get/remove persistence polices, message TTL, and backlog quota on topic level.

Modifications
Update the Pulsar Admin CLI doc to support to set/get/remove persistence polices, message TTL, and backlog quota on topic level.

* Update backlog-quota policies on topic level

* update contents

* update contents
@Chaunceyan
Copy link

Hi team, do we have any plan to publish official document on this feature?

@Anonymitaet Anonymitaet added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. and removed doc-required Your PR changes impact docs and you will update later. labels Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. type/feature The PR added a new feature or issue requested a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants