Inactive topics cannot be consumed if recreated after automatic deletion
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
**Describe the bug**
If a topic is deleted due to brokerDeleteInactiveTopicsEnabled then if you try to re-use the same topic name you can create a producer but all consumers or readers will be hang when requesting the next message.
This does not happen with a local pulsar standalone instance but is reproducible consistently on a cluster using 2.8.2 or 2.9.1. This used to work on pulsar 2.8.1.
**To Reproduce**
1. create a topic, send some messages and disconnect producer
2. wait for the topic to be automatically deleted (default config is 60 seconds)
3. create a consumer or reader on the topic
4. create a new producer and send some more messages
5. try to read a message using the consumer or reader.
6. never receive a message
**Expected behavior**
You should receive some messages after the topic is recreated.
**Screenshots**
N/A
**Desktop (please complete the following information):**
- OS: Tested on Linux & Docker for Windows
**Additional context**
Manually deleting the topic after it has been recreated using the admin API will allow future messages to be consumed.
Contributor guide
Assessment
This issue has not been assessed yet.