Skip to content

The broker restart caused messages backlog and they couldn't be consumed #9830

@YanYunyang

Description

@YanYunyang

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

4.19.90-23-42.v2101.ky10.x86_64

RocketMQ version

5.2.0

JDK Version

openjdk 1.8

Describe the Bug

There is a problem with the queue allocation of consumer instances on the broker. After a certain broker was restarted, the queues of topic "XXX" on this machine were not allocated to any consumers.

Image Image
  1. broker-a has gone down and the routing data has changed. The consumers update the message queue for the assigned topic and remove the queue of broker-a.
  2. broker-a is unavailable. At this point, the message queue to which the topic was assigned does not contain the queue for broker-a.
  3. consumer unscribe the topic "XXX"
  4. broker-a is available and the routing data has changed. The consumer updates the assigned message queue and adds the queue of broker-a.
  5. the consumer has unsubscribed from the topic, so the ‘topicSubscribeInfoTable’ will not be updated, and the queue of broker-a will not be added to the message queue corresponding to the topic "XXX". his update will only be carried out once, unless the 'topicRouteData' changes.
  6. the consumer scribe the topic "XXX", the 'topicSubscribeInfoTable' in the table is outdated and cannot be updated actively.

Steps to Reproduce

1.shutdown broker-a
2.the consumer unscribe the topic "XXX"
3.restart broker-a
4.the consumer scribe the topic "XXX"

What Did You Expect to See?

the queue of topic "XXX" on broker-a has no assigned consumers.

What Did You See Instead?

The queues of "XXX" on broker-a have been correctly assigned consumers for consumption.

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