Pulsar Admin API client should support retries on operations
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
**Is your enhancement request related to a problem? Please describe.**
When autoscaling brokers up and down the namespace bundles move about.
I would like for the Admin Client to handle the retries when a namespace bundle moves and I am trying to either create a new topic or delete a topic.
As best I can tell the Pulsar Client Admin code does not support retries .
Compare Admin Client https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/BaseResource.java
to Pulsar Client
https://github.com/apache/pulsar/blob/04aa9e8e51869d1621a7e25402a656084eebfc09/pulsar-client/src/main/java/org/apache/pulsar/client/util/RetryUtil.java
**Describe alternatives you've considered**
Leave things as they are but this means that the Pulsar Client and the Admin Client are inconsistent and
then I have to write the retry code myself which I am finding complex as certain exceptions are retryable e.g. 503
but others are not e.g. Topic already exists
CC: @sijie
Contributor guide
Research direction
Start with pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/BaseResource.java and compare it with pulsar-client/src/main/java/org/apache/pulsar/client/util/RetryUtil.java. Trace the Admin Client operations used for topic creation and deletion, then define done as retrying namespace-bundle movement failures such as 503 while preserving non-retryable errors such as topic-already-exists.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100