From 8c5644fadebf65f0bf852f81ce5f45071344736c Mon Sep 17 00:00:00 2001 From: shay23b Date: Sun, 9 Jul 2023 13:32:05 +0300 Subject: [PATCH] add connid ti destroy prodcuer consumer --- memphis/consumer.py | 4 +++- memphis/producer.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/memphis/consumer.py b/memphis/consumer.py index 9a6c708..9dcfca8 100644 --- a/memphis/consumer.py +++ b/memphis/consumer.py @@ -218,7 +218,9 @@ async def destroy(self): destroy_consumer_req = { "name": self.consumer_name, "station_name": self.station_name, - "username": self.connection.username + "username": self.connection.username, + "connection_id": self.connection.connection_id, + "req_version": 1, } consumer_name = json.dumps( destroy_consumer_req, indent=2).encode("utf-8") diff --git a/memphis/producer.py b/memphis/producer.py index f9e7f35..fb4d7fe 100644 --- a/memphis/producer.py +++ b/memphis/producer.py @@ -279,7 +279,9 @@ async def destroy(self): destroy_producer_req = { "name": self.producer_name, "station_name": self.station_name, - "username": self.connection.username + "username": self.connection.username, + "connection_id": self.connection.connection_id, + "req_version": 1, } producer_name = json.dumps(destroy_producer_req).encode("utf-8")