Skip to content

[Bug] Partial partition consumers silent after topic fencing #25146

@nodece

Description

@nodece

Search before reporting

  • I searched in the issues and found nothing similar.

Read release policy

  • I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

User environment

  • Observed version: Pulsar 2.10.1 (unsupported)
  • Likely affected: All Pulsar versions, including 3.x, 4.x

Issue Description

When a topic is fenced, some partition consumers may silently stop receiving messages, while others continue working normally.

It only occurs under specific timing and failure conditions, which makes it hard to detect and debug:

  • The broker sometimes fails to deliver the close command to certain consumers (e.g. due to transient network issues, broker overload, or connection state races).
  • Consumers rely entirely on broker-initiated notifications and do not actively verify fencing state after subscription is established.

Once this happens, the affected partition consumer enters a permanent silent failure state.

Symptoms

  • ✅ TCP connection remains alive
  • ✅ No exceptions or error logs
  • ❌ Some partitions stop receiving messages indefinitely

Meanwhile, other partitions of the same consumer continue to work normally, which further hides the issue.

Error messages


Reproducing the issue

  1. Create a partitioned topic and subscribe a consumer.
  2. Trigger topic fencing via topic unload.
  3. Publish messages to the topic.
  4. Observe that some partitions stop receiving messages while others continue normally, with no errors or logs.

This issue is not 100% reproducible.

Additional information

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugThe PR fixed a bug or issue reported a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions