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

[improve] [doc] Add compatibility reminders for retry queues #651

Merged
merged 5 commits into from
Aug 1, 2023

Conversation

poorbarcode
Copy link
Contributor

@poorbarcode poorbarcode commented Jul 21, 2023

This PR fixes apache/pulsar#20612

The default naming rule of Retry topic is {tenant}/{namespaces}/{topic}-{sub}-RETRY, see: https://pulsar.apache.org/docs/3.0.x/concepts-messaging/#retry-letter-topic

The rule before version 2.8 was {tenant}/{namespaces}/{sub}-RETRY, and if there is a ZK node /admin/partitioned-topics/{namespace}-RETRY, Pulsar will still use the rule {tenant}/{namespaces}/{sub}-RETRY even if the version of Pulsar is larger than 2.8. This part of the explanation is not reflected in the documentation.

Related PR

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@github-actions github-actions bot added the doc Improvements or additions to documentation label Jul 21, 2023
@poorbarcode poorbarcode self-assigned this Jul 21, 2023
@poorbarcode poorbarcode added this to the 3.1.0 milestone Jul 21, 2023
@Anonymitaet
Copy link
Member

@gaoran10
Could you please help review this PR from a technical perspective? Then writers will review it from a technical writing side. Thank you!

@Anonymitaet
Copy link
Member

ping @gaoran10 to review, tia!

1 similar comment
@Anonymitaet
Copy link
Member

ping @gaoran10 to review, tia!

@xiaogang-sn
Copy link

If manually specifying the name of retry letter topic or dead letter topic can also achieve the goal we can mention it along the changes as well.

It may also be worthy noting that using <subscriptionname>-RETRY as topic name may cause trouble when multiple topics in the same namespace having the subscriptions with the same name.

@poorbarcode
Copy link
Contributor Author

poorbarcode commented Jul 27, 2023

@xiaogang-sn

If manually specifying the name of retry letter topic or dead letter topic can also achieve the goal we can mention it along the changes as well.

Correct, the following section explains this solution.

截屏2023-07-27 11 56 47

It may also be worthy noting that using -RETRY as topic name may cause trouble when multiple topics in the same namespace having the subscriptions with the same name.

Correct, so in 2.8.x, the format rule was changed to {topic}-{sub}-RETRY

@xiaogang-sn
Copy link

xiaogang-sn commented Jul 27, 2023

I would suggest to add the consequence in brief if continuing using <subscriptionname>-RETRYas retry topic name or add a reference link to the relevant issue/pr. The rest looks good to me.

@poorbarcode
Copy link
Contributor Author

@xiaogang-sn

I would suggest to add the consequence in brief if continuing using -RETRYas retry topic name or add a reference link to the relevant issue/pr. The rest looks good to me.

Done

Comment on lines 247 to 252
Note: In versions `2.6.x` and `2.7.x`, the default retry letter topic uses this format is `<subscriptionname>-RETRY`.
If you are upgrading from version `2.6.x~2.7.x` to version `2.8.x` or greater, then you need to manually delete
the historical retry letter topics and retry letter partitioned topics. Otherwise, Pulsar will continue to use the
original topics, which were formatted with `<subscriptionname>-RETRY`. Rule `<subscriptionname>-RETRY` should be avoided
to use, because if multiple topics under the same namespace have the same subscription, the retry message topic names
for multiple topics will be the same, resulting in mutual consumption.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Note: In versions `2.6.x` and `2.7.x`, the default retry letter topic uses this format is `<subscriptionname>-RETRY`.
If you are upgrading from version `2.6.x~2.7.x` to version `2.8.x` or greater, then you need to manually delete
the historical retry letter topics and retry letter partitioned topics. Otherwise, Pulsar will continue to use the
original topics, which were formatted with `<subscriptionname>-RETRY`. Rule `<subscriptionname>-RETRY` should be avoided
to use, because if multiple topics under the same namespace have the same subscription, the retry message topic names
for multiple topics will be the same, resulting in mutual consumption.
:::note
- For Pulsar 2.6.x and 2.7.x, the default retry letter topic uses the format of `<subscriptionname>-RETRY`. If you upgrade from 2.6.x~2.7.x to 2.8.x or later, you need to delete historical retry letter topics and retry letter partitioned topics. Otherwise, Pulsar continues to use original topics, which are formatted with `<subscriptionname>-RETRY`.
- It is not recommended to use `<subscriptionname>-RETRY` because if multiple topics under the same namespace have the same subscription, then retry message topic names for multiple topics might be the same, which will result in mutual consumptions.
:::

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

截屏2023-07-28 11 15 29

Copy link
Contributor

@gaoran10 gaoran10 left a comment

Choose a reason for hiding this comment

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

LGTM

@Anonymitaet Anonymitaet merged commit 122e648 into apache:main Aug 1, 2023
2 checks passed
@Technoboy- Technoboy- mentioned this pull request Aug 9, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Doc] compatibility naming rule for the retry topic
4 participants