C# Class Kafka.Client.Consumer

Consumes messages from Kafka.
Mostra file Open project: precog/kafka

Public Methods

Method Description
Consume ( MultiFetchRequest request ) : List>

Executes a multi-fetch operation.

Consume ( FetchRequest request ) : List

Consumes messages from Kafka.

Consume ( string topic, int partition, long offset ) : List

Consumes messages from Kafka.

Consume ( string topic, int partition, long offset, int maxSize ) : List

Consumes messages from Kafka.

Consumer ( string server, int port ) : System

Initializes a new instance of the Consumer class.

GetOffsetsBefore ( Kafka.Client.OffsetRequest request ) : IList

Get a list of valid offsets (up to maxSize) before the given time.

GetOffsetsBefore ( string topic, int partition, long time, int maxNumOffsets ) : IList

Get a list of valid offsets (up to maxSize) before the given time.

Method Details

Consume() public method

Executes a multi-fetch operation.
public Consume ( MultiFetchRequest request ) : List>
request MultiFetchRequest The request to push to Kafka.
return List>

Consume() public method

Consumes messages from Kafka.
public Consume ( FetchRequest request ) : List
request FetchRequest The request to send to Kafka.
return List

Consume() public method

Consumes messages from Kafka.
public Consume ( string topic, int partition, long offset ) : List
topic string The topic to consume from.
partition int The partition to consume from.
offset long The offset to start at.
return List

Consume() public method

Consumes messages from Kafka.
public Consume ( string topic, int partition, long offset, int maxSize ) : List
topic string The topic to consume from.
partition int The partition to consume from.
offset long The offset to start at.
maxSize int The maximum size.
return List

Consumer() public method

Initializes a new instance of the Consumer class.
public Consumer ( string server, int port ) : System
server string The server to connect to.
port int The port to connect to.
return System

GetOffsetsBefore() public method

Get a list of valid offsets (up to maxSize) before the given time.
public GetOffsetsBefore ( Kafka.Client.OffsetRequest request ) : IList
request Kafka.Client.OffsetRequest The offset request.
return IList

GetOffsetsBefore() public method

Get a list of valid offsets (up to maxSize) before the given time.
public GetOffsetsBefore ( string topic, int partition, long time, int maxNumOffsets ) : IList
topic string The topic to check.
partition int The partition on the topic.
time long time in millisecs (if -1, just get from the latest available)
maxNumOffsets int That maximum number of offsets to return.
return IList