Skip to content

[Bug] auto delete topics when in Master-Slave Automatic Failover Mode #9984

@GarfieldZhan

Description

@GarfieldZhan

Before Creating the Bug Report

  • I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

OS: Alibaba Cloud Linux release 3 (OpenAnolis Edition).
2C8G
1 master 2 slave

RocketMQ version

rocketmq-all-5.3.4

JDK Version

No response

Describe the Bug

In 5.3.4, using Master-Slave Automatic Failover Mode, I have 1 master and 2 slave, I find rocketmq broker delete topics automatically. Here is my monitor graph below:

Image

The broker log writes:
2026-01-05 14:59:21 INFO BrokerControllerScheduledThread1 - delete topic config OK, topic: TopicConfig [topicName=OFFSET_MOVED_EVENT, readQueueNums=1, writeQueueNums=1, perm=RW-, topicFilterType=SINGLE_TAG, topicSysFlag=0, order=false, attributes={}]

Is this a expected behavior?How can I know if the delete behavior will not cause error?And how can I know if there is an error when syncing topics?

Steps to Reproduce

I deploy 3 nameserver, and the configs are the same, as below:

#Namesrv config
listenPort = 9876
enableControllerInNamesrv = true

#controller config
controllerDLegerGroup = sg
controllerDLegerPeers = n0-10.0.3.82:9878;n1-10.1.2.219:9878;n2-10.1.1.249:9878
controllerDLegerSelfId = n0
metricsExporterType = PROM
metricsPromExporterPort = 5558
metricsPromExporterHost = 0.0.0.0

also deploy 3 brokers , the confgs are same as below:

brokerClusterName = sg
brokerName = broker-a
brokerId = -1
deleteWhen = 04
fileReservedTime = 48
brokerRole = SLAVE
namesrvAddr = 10.0.3.82:9876;10.1.2.219:9876;10.1.1.249:9876
enableControllerMode = true
controllerAddr = 10.0.3.82:9878;10.1.2.219:9878;10.1.1.249:9878
allAckInSyncStateSet = true
listenPort = 30911
abortFile = /data/rocketmq/store/abort
storePathRootDir = /data/rocketmq/store
storePathCommitLog = /data/rocketmq/store/commitlog
storePathConsumeQueue = /data/rocketmq/store/consumequeue
storePathIndex = /data/rocketmq/store/index
storeCheckpoint = /data/rocketmq/store/checkpoint
autoCreateTopicEnable = true
enablePropertyFilter = true
messageDelayLevel=1s 5s 10s 30s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m 20m 30m 1h 2h 6h 12h 1d
metricsExporterType = PROM
metricsPromExporterPort = 5557
metricsPromExporterHost = 0.0.0.0

What Did You Expect to See?

topics are not deleted automatically

What Did You See Instead?

delete topics automatically, unexpectedly and unregularly

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions