From 7629c0af903ac9b994d4e872f60d90d91b23538e Mon Sep 17 00:00:00 2001 From: Francois Date: Mon, 23 Dec 2019 23:35:03 +0100 Subject: [PATCH] consumer: added close! with timeout argument --- src/kinsky/client.clj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kinsky/client.clj b/src/kinsky/client.clj index fbc8380..74583dc 100755 --- a/src/kinsky/client.clj +++ b/src/kinsky/client.clj @@ -533,6 +533,10 @@ GenericDriver (close! [this] (.close consumer)) + (close! [this timeout] + (if (nil? timeout) + (.close consumer) + (.close consumer (long timeout) TimeUnit/MILLISECONDS))) MetadataDriver (partitions-for [this topic] (mapv partition-info->data (.partitionsFor consumer topic)))