/// <summary> /// Open numberOfStreams streams for specified topic. Paritions will be assigned to each /// stream in such a way, that each stream will consume roughly the same number of partitions. /// </summary> public List <ConsumerMessageStream> OpenStreams(String topic, Int32 numberOfStreams) { var connector = new ConsumerConnector(_stateStorageDirectory, _address, _infoResponse, _context.ZmqContext); var streams = connector.CreateMessageStreams(topic, numberOfStreams); return(streams); }
/// <summary> /// Open single stream for specified topic /// </summary> public ConsumerMessageStream OpenStream(String topic) { var connector = new ConsumerConnector(_stateStorageDirectory, _address, _infoResponse, _context.ZmqContext); var streams = connector.CreateMessageStreams(topic, 1); return(streams[0]); }
/// <summary> /// Open numberOfStreams streams for specified topic. Paritions will be assigned to each /// stream in such a way, that each stream will consume roughly the same number of partitions. /// </summary> public List<ConsumerMessageStream> OpenStreams(String topic, Int32 numberOfStreams) { var connector = new ConsumerConnector(_stateStorageDirectory, _address, _infoResponse, _context.ZmqContext); var streams = connector.CreateMessageStreams(topic, numberOfStreams); return streams; }
/// <summary> /// Open single stream for specified topic /// </summary> public ConsumerMessageStream OpenStream(String topic) { var connector = new ConsumerConnector(_stateStorageDirectory, _address, _infoResponse, _context.ZmqContext); var streams = connector.CreateMessageStreams(topic, 1); return streams[0]; }