Consumer

Simple Consumer (legacy)

A simple non-balanced, non-group-aware, consumer.

Constructors

this
this(GlobalConf conf)

Creates a new Kafka consumer handle.

Destructor

~this
~this()
Undocumented in source.

Members

Static functions

consume
void consume(Topic topic, int partition, int timeout_ms, Message msg)

Consume a single message from \p topic and \p partition.

consume
void consume(Queue queue, int timeout_ms, Message msg)

Consume a single message from the specified queue.

consumeCallback
int consumeCallback(Topic topic, int partition, int timeout_ms, ConsumeCb consume_cb)

Consumes messages from \p topic and \p partition, calling the provided callback for each consumed messsage.

consumeCallback
int consumeCallback(Queue queue, int timeout_ms, ConsumeCb consume_cb)

Consumes messages from \p queue, calling the provided callback for each consumed messsage.

offsetTail
long offsetTail(long offset)

Converts an offset into the logical offset from the tail of a topic.

seek
ErrorCode seek(Topic topic, int partition, long offset, int timeout_ms)

Seek consumer for topic+partition to \p offset which is either an absolute or logical offset.

start
ErrorCode start(Topic topic, int partition, long offset, Queue queue)

Start consuming messages for topic and \p partition at offset \p offset which may either be a proper offset (0..N) or one of the the special offsets: \p OFFSET_BEGINNING or \p OFFSET_END.

stop
ErrorCode stop(Topic topic, int partition)

Stop consuming messages for topic and \p partition, purging all messages currently in the local queue.

Meta