C# Class Brod.Consumers.ConsumerConnector

ファイルを表示 Open project: paralect/brod Class Usage Examples

Public Methods

Method Description
ConsumerConnector ( String stateStorageDirectory, String brokerAddress, BrokerInfoResponse configuration, ZMQ context ) : System
CreateMessageStreams ( Int32>.Dictionary topicToStreamCount ) : List>.Dictionary
CreateMessageStreams ( String topic, Int32 numberOfStreams ) : List
GetNumberOfPartitionsForTopic ( String topic ) : Int32
ValidateStreamNumber ( String topic, Int32 numberOfStreams ) : void

Returns true of partition number is valid for current broker configuration

ValidateTopicToStreamDictionary ( Int32>.Dictionary topicToStreamCount ) : void

Private Methods

Method Description
BuildStreamsForTopic ( String topic, Int32 numberOfStreams ) : List
GetPartitions ( Int32 fromIncluding, Int32 count ) : List

Method Details

ConsumerConnector() public method

public ConsumerConnector ( String stateStorageDirectory, String brokerAddress, BrokerInfoResponse configuration, ZMQ context ) : System
stateStorageDirectory String
brokerAddress String
configuration Brod.Contracts.Responses.BrokerInfoResponse
context ZMQ
return System

CreateMessageStreams() public method

public CreateMessageStreams ( Int32>.Dictionary topicToStreamCount ) : List>.Dictionary
topicToStreamCount Int32>.Dictionary
return List>.Dictionary

CreateMessageStreams() public method

public CreateMessageStreams ( String topic, Int32 numberOfStreams ) : List
topic String
numberOfStreams System.Int32
return List

GetNumberOfPartitionsForTopic() public method

public GetNumberOfPartitionsForTopic ( String topic ) : Int32
topic String
return System.Int32

ValidateStreamNumber() public method

Returns true of partition number is valid for current broker configuration
public ValidateStreamNumber ( String topic, Int32 numberOfStreams ) : void
topic String
numberOfStreams System.Int32
return void

ValidateTopicToStreamDictionary() public method

public ValidateTopicToStreamDictionary ( Int32>.Dictionary topicToStreamCount ) : void
topicToStreamCount Int32>.Dictionary
return void