pykafka.exceptions¶
Author: Keith Bourgoin, Emmett Butler
-
exception
pykafka.exceptions.
ConsumerStoppedException
¶ Bases:
pykafka.exceptions.KafkaException
Indicates that the consumer was stopped when an operation was attempted that required it to be running
-
exception
pykafka.exceptions.
GroupAuthorizationFailed
¶ Bases:
pykafka.exceptions.ProtocolClientError
Returned by the broker when the client is not authorized to access a particular groupId.
-
exception
pykafka.exceptions.
GroupCoordinatorNotAvailable
¶ Bases:
pykafka.exceptions.ProtocolClientError
The broker returns this error code for consumer metadata requests or offset commit requests if the offsets topic has not yet been created.
-
exception
pykafka.exceptions.
GroupLoadInProgress
¶ Bases:
pykafka.exceptions.ProtocolClientError
The broker returns this error code for an offset fetch request if it is still loading offsets (after a leader change for that offsets topic partition), or in response to group membership requests (such as heartbeats) when group metadata is being loaded by the coordinator.
-
exception
pykafka.exceptions.
IllegalGeneration
¶ Bases:
pykafka.exceptions.ProtocolClientError
Returned from group membership requests (such as heartbeats) when the generation id provided in the request is not the current generation
-
exception
pykafka.exceptions.
InconsistentGroupProtocol
¶ Bases:
pykafka.exceptions.ProtocolClientError
Returned in join group when the member provides a protocol type or set of protocols which is not compatible with the current group.
-
exception
pykafka.exceptions.
InvalidMessageError
¶ Bases:
pykafka.exceptions.ProtocolClientError
This indicates that a message contents does not match its CRC
-
exception
pykafka.exceptions.
InvalidMessageSize
¶ Bases:
pykafka.exceptions.ProtocolClientError
The message has a negative size
-
exception
pykafka.exceptions.
InvalidSessionTimeout
¶ Bases:
pykafka.exceptions.ProtocolClientError
Returned in join group when the requested session timeout is outside of the allowed range on the broker
-
exception
pykafka.exceptions.
KafkaException
¶ Bases:
exceptions.Exception
Generic exception type. The base of all pykafka exception types.
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
exception
pykafka.exceptions.
LeaderNotAvailable
¶ Bases:
pykafka.exceptions.ProtocolClientError
This error is thrown if we are in the middle of a leadership election and there is currently no leader for this partition and hence it is unavailable for writes.
-
exception
pykafka.exceptions.
MessageSizeTooLarge
¶ Bases:
pykafka.exceptions.ProtocolClientError
The server has a configurable maximum message size to avoid unbounded memory allocation. This error is thrown if the client attempts to produce a message larger than this maximum.
-
exception
pykafka.exceptions.
NoBrokersAvailableError
¶ Bases:
pykafka.exceptions.KafkaException
Indicates that no brokers were available to the cluster’s metadata update attempts
-
exception
pykafka.exceptions.
NoMessagesConsumedError
¶ Bases:
pykafka.exceptions.KafkaException
Indicates that no messages were returned from a MessageSet
-
exception
pykafka.exceptions.
NotCoordinatorForGroup
¶ Bases:
pykafka.exceptions.ProtocolClientError
The broker returns this error code if it receives an offset fetch or commit request for a consumer group that it is not a coordinator for.
-
exception
pykafka.exceptions.
NotLeaderForPartition
¶ Bases:
pykafka.exceptions.ProtocolClientError
This error is thrown if the client attempts to send messages to a replica that is not the leader for some partition. It indicates that the client’s metadata is out of date.
-
exception
pykafka.exceptions.
OffsetMetadataTooLarge
¶ Bases:
pykafka.exceptions.ProtocolClientError
If you specify a string larger than configured maximum for offset metadata
-
exception
pykafka.exceptions.
OffsetOutOfRangeError
¶ Bases:
pykafka.exceptions.ProtocolClientError
The requested offset is outside the range of offsets maintained by the server for the given topic/partition.
-
exception
pykafka.exceptions.
OffsetRequestFailedError
¶ Bases:
pykafka.exceptions.KafkaException
Indicates that OffsetRequests for offset resetting failed more times than the configured maximum
-
exception
pykafka.exceptions.
PartitionOwnedError
(partition, *args, **kwargs)¶ Bases:
pykafka.exceptions.KafkaException
Indicates a given partition is still owned in Zookeeper.
-
exception
pykafka.exceptions.
ProduceFailureError
¶ Bases:
pykafka.exceptions.KafkaException
Indicates a generic failure in the producer
-
exception
pykafka.exceptions.
ProducerQueueFullError
¶ Bases:
pykafka.exceptions.KafkaException
Indicates that one or more of the AsyncProducer’s internal queues contain at least max_queued_messages messages
-
exception
pykafka.exceptions.
ProducerStoppedException
¶ Bases:
pykafka.exceptions.KafkaException
Raised when the Producer is used while not running
-
exception
pykafka.exceptions.
ProtocolClientError
¶ Bases:
pykafka.exceptions.KafkaException
Base class for protocol errors
-
exception
pykafka.exceptions.
RdKafkaException
¶ Bases:
pykafka.exceptions.KafkaException
Error in rdkafka extension that hasn’t any equivalent pykafka exception
In pykafka.rdkafka._rd_kafka we try hard to emit the same exceptions that the pure pykafka classes emit. This is a fallback for the few cases where we can’t find a suitable exception
-
exception
pykafka.exceptions.
RdKafkaStoppedException
¶ Bases:
pykafka.exceptions.RdKafkaException
Consumer or producer handle was stopped
Raised by the C extension, to be translated to ConsumerStoppedException or ProducerStoppedException by the caller
-
exception
pykafka.exceptions.
RebalanceInProgress
¶ Bases:
pykafka.exceptions.ProtocolClientError
Returned in heartbeat requests when the coordinator has begun rebalancing the group. This indicates to the client that it should rejoin the group.
-
exception
pykafka.exceptions.
RequestTimedOut
¶ Bases:
pykafka.exceptions.ProtocolClientError
This error is thrown if the request exceeds the user-specified time limit in the request.
-
exception
pykafka.exceptions.
SocketDisconnectedError
¶ Bases:
pykafka.exceptions.KafkaException
Indicates that the socket connecting this client to a kafka broker has become disconnected
-
exception
pykafka.exceptions.
UnknownError
¶ Bases:
pykafka.exceptions.ProtocolClientError
An unexpected server erro
-
exception
pykafka.exceptions.
UnknownMemberId
¶ Bases:
pykafka.exceptions.ProtocolClientError
Returned from group requests (offset commits/fetches, heartbeats, etc) when the memberId is not in the current generation.
-
exception
pykafka.exceptions.
UnknownTopicOrPartition
¶ Bases:
pykafka.exceptions.ProtocolClientError
This request is for a topic or partition that does not exist on this broker.