Pause/resume a consumer by topic (#67)

* Pause a consumer by topic

* Changes per review comments

* convert rvalue to value

* Refactored code to provide a more generic way of getting partition subsets

* Changes per code review and added test cases

* Modified loop to use binary search instead of linear

* Simplify find_matches test cases
This commit is contained in:
Alex Damian
2018-05-23 16:03:47 -04:00
committed by Matias Fontanini
parent ee71b3979a
commit 46c396f729
5 changed files with 110 additions and 1 deletions

View File

@@ -193,6 +193,16 @@ public:
*/
void unassign();
/**
* \brief Pauses all consumption
*/
void pause();
/**
* \brief Resumes all consumption
*/
void resume();
/**
* \brief Commits the current partition assignment
*
@@ -364,7 +374,6 @@ public:
private:
static void rebalance_proxy(rd_kafka_t *handle, rd_kafka_resp_err_t error,
rd_kafka_topic_partition_list_t *partitions, void *opaque);
void close();
void commit(const Message& msg, bool async);
void commit(const TopicPartitionList* topic_partitions, bool async);