pykafka.exceptions

Author: Keith Bourgoin, Emmett Butler

exception pykafka.exceptions.ConsumerCoordinatorNotAvailable

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.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.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.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.NoMessagesConsumedError

Bases: pykafka.exceptions.KafkaException

Indicates that no messages were returned from a MessageSet

exception pykafka.exceptions.NotCoordinatorForConsumer

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.OffsetsLoadInProgress

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).

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.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.UnknownTopicOrPartition

Bases: pykafka.exceptions.ProtocolClientError

This request is for a topic or partition that does not exist on this broker.

exception pykafka.exceptions.ZookeeperConnectionLost

Bases: pykafka.exceptions.ConsumerStoppedException

Indicates consumer is waiting for its zk connection to recover