From 098127e35421c797c3c5c6991e4bfe1c190e9f3e Mon Sep 17 00:00:00 2001 From: Jack Leow Date: Mon, 7 Oct 2024 15:57:04 -0700 Subject: [PATCH] Changed BrokerMetadata#nodeId to str, and convert all values to str before setting --- aiokafka/client.py | 2 +- aiokafka/structs.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aiokafka/client.py b/aiokafka/client.py index 4eea5259..1af11675 100644 --- a/aiokafka/client.py +++ b/aiokafka/client.py @@ -693,7 +693,7 @@ async def coordinator_lookup(self, coordinator_type, coordinator_key): err = error_type() raise err self.cluster.add_coordinator( - resp.coordinator_id, + str(resp.coordinator_id), resp.host, resp.port, rack=None, diff --git a/aiokafka/structs.py b/aiokafka/structs.py index 7118b28c..34a5fc0c 100644 --- a/aiokafka/structs.py +++ b/aiokafka/structs.py @@ -26,7 +26,7 @@ class TopicPartition(NamedTuple): class BrokerMetadata(NamedTuple): """A Kafka broker metadata used by admin tools""" - nodeId: int + nodeId: str "The Kafka broker id" host: str