Add topics to current consumer, if any topic to be added not exists, return error
Add topics to current consumer, if any topic to be added not exists, return error
addTopics(topics, callback, fromOffset)
Add topics to current consumer, if any topic to be added not exists, return error
Add topics to current consumer, if any topic to be added not exists, return error
addTopics(topics, callback, fromOffset)
Closes the consumer
Closes the consumer
the callback
consumer.close(force, callback)
Closes the consumer
Closes the consumer
if set to true, it forces the consumer to commit the current offset before closing, default false
the callback
consumer.close(force, callback)
Commit offset of the current topics manually, this method should be called when a consumer leaves.
Commit offset of the current topics manually, this method should be called when a consumer leaves.
consumer.commit(function(err, data) { .. });
Pauses the consumer
Pauses the consumer
consumer.pause()
Removes an array of topics
Removes an array of topics
the array of topics to remove
the callback
consumer.removeTopics(['t1', 't2'], function (err, removed) { .. })
Resume the consumers
Resume the consumers
consumer.resume()
Set offset of the given topic
Set offset of the given topic
consumer.setOffset('topic', 0, 0)
High-Level Consumer