Skip to content

Kafka ListOffsets requests fail when bootstrap broker is not the partition leader #2993

Description

@mdreizin

What happened?

TablePro successfully connects to a multi-broker Kafka cluster and can discover topics and brokers, but cannot retrieve topic data.

Both of the following commands fail:

DESCRIBE TOPIC "xxx"
CONSUME "xxx" FROM NEWEST LIMIT 100

The failure occurs with:

The broker rejected the ListOffsets request: this broker no longer leads the partition

Cluster metadata is retrieved successfully and shows multiple brokers:

broker 0: <broker-0>:<port>
broker 1: <broker-1>:<port>
broker 2: <broker-2>:<port>

All three advertised broker endpoints are reachable.

The issue appears to be related to ListOffsets requests being sent through the control/bootstrap connection rather than to the current leader of the requested partition.

Steps to reproduce

  1. Connect TablePro to a multi-broker Kafka cluster.
  2. Verify that the connection succeeds and topics are visible.
  3. Run:
DESCRIBE TOPIC "xxx"
  1. Run:
CONSUME "xxx" FROM NEWEST LIMIT 100
  1. Both commands fail with the ListOffsets error.

Expected behavior

DESCRIBE TOPIC and CONSUME should successfully retrieve the topic metadata and messages.

ListOffsets requests should be routed to the current leader of each partition. If leadership changes, TablePro should refresh metadata and retry the request against the new leader.

Database type

N/A

TablePro version

0.75.0 (131)

macOS version & chip

27.0 / M4 Pro

Screenshots / Logs

Image
The broker rejected the ListOffsets request: this broker no longer leads the partition

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions