apache / apache/pulsar

Inactive topics cannot be consumed if recreated after automatic deletion

Open
#14,079 22 comments 0 reactions 1 assignee Assigned to @Technoboy- View on GitHub
Stale type/bug
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.