mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-01 11:07:56 +00:00
Merge pull request #281 from ClickHouse-Extras/fix_failover
Fix for failover issue.
This commit is contained in:
@@ -124,16 +124,10 @@ void Consumer::unsubscribe() {
|
||||
|
||||
void Consumer::assign(const TopicPartitionList& topic_partitions) {
|
||||
rd_kafka_resp_err_t error;
|
||||
if (topic_partitions.empty()) {
|
||||
error = rd_kafka_assign(get_handle(), nullptr);
|
||||
check_error(error);
|
||||
}
|
||||
else {
|
||||
TopicPartitionsListPtr topic_list_handle = convert(topic_partitions);
|
||||
error = rd_kafka_assign(get_handle(), topic_list_handle.get());
|
||||
check_error(error, topic_list_handle.get());
|
||||
}
|
||||
}
|
||||
|
||||
void Consumer::unassign() {
|
||||
rd_kafka_resp_err_t error = rd_kafka_assign(get_handle(), nullptr);
|
||||
|
||||
Reference in New Issue
Block a user