kafka-client-0.7.0.0: Low-level Haskell client library for Apache Kafka 0.7.

Safe HaskellNone
LanguageHaskell2010

Kafka.Internal.Types

Synopsis

Documentation

data Error Source

Different errors returned by Kafka.

Constructors

UnknownError

Unknown error

OffsetOutOfRangeError

Offset requested is invalid or no longer available on the server.

InvalidMessageError

A message failed to match its checksum.

WrongPartitionError

The requested partition doesn't exist.

InvalidFetchSizeError

The maximum size requested for fetching is smaller than the message being fetched.

data Compression Source

Methods of compression supported by Kafka.

Constructors

NoCompression

The message is uncompressed.

GzipCompression

The message is compressed using gzip compression and may contain other messages in it.

SnappyCompression

The message is compressed using snappy compression and may contain other messages in it.

data OffsetsTime Source

Different times for which offsets may be retrieved using offsets.

Constructors

OffsetsLatest

Retrieve the latest offsets

OffsetsEarliest

Retrieve the earliest offsets.

OffsetsBefore !UTCTime

Retrieve offsets before the given time.

Keep in mind that the response will not contain the precise offset that occurred around this time. It will return up to the specified count of offsets in descending, each being the first offset of every segment file for the specified partition with a modified time less than this time, and possibly a "high water mark" for the last segment of the partition (if it was modified before this time) which specifies the offset at which the next message to that partition will be written.

newtype Topic Source

Represents a Kafka topic.

This is an instance of IsString so a literal string may be used to create a Topic with the OverloadedStrings extension.

Constructors

Topic ByteString 

newtype Offset Source

Represents an Offset in Kafka.

This is an instance of Num so a literal number may be used to create an Offset.

Constructors

Offset Word64 

newtype Partition Source

Represents a Kafka topic partition.

This is an instance of Num so a literal number may be used to create a Partition.

Constructors

Partition Word32 

newtype Size Source

Represents a size.

This is an instance of Num so a literal number may be used to create a Size.

Constructors

Size Word32 

newtype Count Source

Represents a Count.

This is an instance of Num so a literal number may be used to create a Size.

Constructors

Count Word32 

data Message Source

Represents a Message being sent through Kafka.

Constructors

Message 

Fields

messageCompression :: !Compression

Compression used for the message.

If this is anything but NoCompression, this message contains other messages in it.

messagePayload :: !ByteString

Message payload.

If the message is using any compression scheme, the payload contains other messages in the same format.

newtype MessageSet Source

Represents a collection of message payloads.

These are compressed into a single message using Snappy compression when being sent.

Constructors

MessageSet