Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kafka/consumer/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class KafkaConsumer:
None, the client will attempt to determine the broker version via
ApiVersionsRequest API or, for brokers earlier than 0.10, probing
various known APIs. Dynamic version checking is performed eagerly
during __init__ and can raise NoBrokersAvailableError if no connection
during __init__ and can raise KafkaTimeoutError if no connection
was made before timeout (see api_version_auto_timeout_ms below).
Different versions enable different functionality.

Expand Down
4 changes: 2 additions & 2 deletions kafka/coordinator/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def ensure_coordinator_ready(self, timeout_ms=None):
if self.config['api_version'] < (0, 8, 2):
maybe_coordinator_id = self._client.least_loaded_node()
if maybe_coordinator_id is None:
future = Future().failure(Errors.NoBrokersAvailable())
future = Future().failure(Errors.NodeNotReadyError('coordinator'))
else:
self.coordinator_id = maybe_coordinator_id
self._client.maybe_connect(self.coordinator_id)
Expand Down Expand Up @@ -796,7 +796,7 @@ def _send_group_coordinator_request(self):
"""
node_id = self._client.least_loaded_node()
if node_id is None:
return Future().failure(Errors.NoBrokersAvailable())
return Future().failure(Errors.NodeNotReadyError('coordinator'))

elif not self._client.ready(node_id, metadata_priority=False):
e = Errors.NodeNotReadyError(node_id)
Expand Down
5 changes: 0 additions & 5 deletions kafka/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ class MetadataEmptyBrokerList(KafkaError):
retriable = True


class NoBrokersAvailable(KafkaError):
retriable = True
invalid_metadata = True


class NoOffsetForPartitionError(KafkaError):
pass

Expand Down
2 changes: 1 addition & 1 deletion kafka/producer/kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ class KafkaProducer:
None, the client will attempt to determine the broker version via
ApiVersionsRequest API or, for brokers earlier than 0.10, probing
various known APIs. Dynamic version checking is performed eagerly
during __init__ and can raise NoBrokersAvailableError if no connection
during __init__ and can raise KafkaTimeoutError if no connection
was made before timeout (see api_version_auto_timeout_ms below).
Different versions enable different functionality.

Expand Down
Loading