C# Class Kafka.Client.Consumers.Consumer

The low-level API of consumer of Kafka messages
Maintains a connection to a single broker and has a close correspondence to the network requests sent to the server. Also, is completely stateless.
Inheritance: IConsumer
Mostra file Open project: precog/kafka Class Usage Examples

Public Methods

Method Description
Consumer ( Kafka.Client.Cfg.ConsumerConfiguration config ) : System

Initializes a new instance of the Consumer class.

Consumer ( Kafka.Client.Cfg.ConsumerConfiguration config, string host, int port ) : System

Initializes a new instance of the Consumer class.

Fetch ( FetchRequest request ) : Kafka.Client.Messages.BufferedMessageSet

Fetch a set of messages from a topic.

Offset is passed in on every request, allowing the user to maintain this metadata however they choose.

GetOffsetsBefore ( OffsetRequest request ) : IList

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

MultiFetch ( MultiFetchRequest request ) : IList

Combine multiple fetch requests in one call.

Offset is passed in on every request, allowing the user to maintain this metadata however they choose.

Method Details

Consumer() public method

Initializes a new instance of the Consumer class.
public Consumer ( Kafka.Client.Cfg.ConsumerConfiguration config ) : System
config Kafka.Client.Cfg.ConsumerConfiguration /// The consumer configuration. ///
return System

Consumer() public method

Initializes a new instance of the Consumer class.
public Consumer ( Kafka.Client.Cfg.ConsumerConfiguration config, string host, int port ) : System
config Kafka.Client.Cfg.ConsumerConfiguration /// The consumer configuration. ///
host string
port int
return System

Fetch() public method

Fetch a set of messages from a topic.
Offset is passed in on every request, allowing the user to maintain this metadata however they choose.
public Fetch ( FetchRequest request ) : Kafka.Client.Messages.BufferedMessageSet
request Kafka.Client.Requests.FetchRequest /// Specifies the topic name, topic partition, starting byte offset, maximum bytes to be fetched. ///
return Kafka.Client.Messages.BufferedMessageSet

GetOffsetsBefore() public method

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

MultiFetch() public method

Combine multiple fetch requests in one call.
Offset is passed in on every request, allowing the user to maintain this metadata however they choose.
public MultiFetch ( MultiFetchRequest request ) : IList
request Kafka.Client.Requests.MultiFetchRequest /// The list of fetch requests. ///
return IList