Skip to content

Commit 5bd43b6

Browse files
committed
Consumer destructor will no longer trigger consumer_close()
1 parent 725fd21 commit 5bd43b6

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ v1.5.2 is a maintenance release with the following fixing and enhancements:
88
- Add AdminClient.list_groups API (@messense, #948)
99
- Rename asyncio.py example to avoid circular import (#945)
1010
- Upgrade bundled OpenSSL to v1.1.1h (from v1.0.2u)
11+
- The Consumer destructor will no longer trigger `consumer.close()`
12+
callbacks, `consumer.close()` must now be explicitly called to cleanly
13+
close down the consumer and leave the group.
14+
- Fix `PY_SSIZE_T_CLEAN` warning in calls to produce().
15+
- Restructure source tree to avoid undesired local imports of confluent_kafka
16+
when running pytest.
1117

1218
confluent-kafka-python is based on librdkafka v1.5.2, see the
1319
[librdkafka release notes](https://github.com/edenhill/librdkafka/releases/tag/v1.5.2)

src/confluent_kafka/src/Consumer.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,8 @@ static void Consumer_dealloc (Handle *self) {
6363

6464
CallState_begin(self, &cs);
6565

66-
/* If application has not called c.close() then
67-
* rd_kafka_destroy() will, and that might trigger
68-
* callbacks to be called from consumer_close().
69-
* This should probably be fixed in librdkafka,
70-
* or the application. */
71-
rd_kafka_destroy(self->rk);
66+
rd_kafka_destroy_flags(self->rk,
67+
RD_KAFKA_DESTROY_F_NO_CONSUMER_CLOSE);
7268

7369
CallState_end(self, &cs);
7470
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy