Skip to content

Commit 77e47a5

Browse files
committed
Raise error during rebalance if subscribed topics are not authorized
1 parent 50b96ca commit 77e47a5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

kafka/coordinator/consumer.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,8 @@ def group_protocols(self):
136136

137137
def _handle_metadata_update(self, cluster):
138138
# if we encounter any unauthorized topics, raise an exception
139-
# TODO
140-
#if self._cluster.unauthorized_topics:
141-
# raise TopicAuthorizationError(self._cluster.unauthorized_topics)
139+
if cluster.unauthorized_topics:
140+
raise Errors.TopicAuthorizationFailedError(cluster.unauthorized_topics)
142141

143142
if self._subscription.subscribed_pattern:
144143
topics = []

0 commit comments

Comments
 (0)