From 77e47a53b5247f2e77188adf21c29d98b7128081 Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Sat, 16 Jul 2016 21:11:33 -0700 Subject: Raise error during rebalance if subscribed topics are not authorized --- kafka/coordinator/consumer.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kafka/coordinator/consumer.py b/kafka/coordinator/consumer.py index fd728d9..2543238 100644 --- a/kafka/coordinator/consumer.py +++ b/kafka/coordinator/consumer.py @@ -136,9 +136,8 @@ class ConsumerCoordinator(BaseCoordinator): def _handle_metadata_update(self, cluster): # if we encounter any unauthorized topics, raise an exception - # TODO - #if self._cluster.unauthorized_topics: - # raise TopicAuthorizationError(self._cluster.unauthorized_topics) + if cluster.unauthorized_topics: + raise Errors.TopicAuthorizationFailedError(cluster.unauthorized_topics) if self._subscription.subscribed_pattern: topics = [] -- cgit v1.2.1