mirror of
https://github.com/sogou/workflow.git
synced 2026-10-28 19:19:22 +08:00
Merge pull request #868 from wzl12356/master
kafka: update WFKafkaClient
This commit is contained in:
+239
-428
File diff suppressed because it is too large
Load Diff
@@ -127,8 +127,6 @@ private:
|
||||
class WFKafkaClient
|
||||
{
|
||||
public:
|
||||
WFKafkaClient();
|
||||
|
||||
// example: kafka://10.160.23.23:9000
|
||||
// example: kafka://kafka.sogou
|
||||
// example: kafka.sogou:9090
|
||||
@@ -137,7 +135,7 @@ public:
|
||||
|
||||
int init(const std::string& broker_url, const std::string& group);
|
||||
|
||||
void deinit();
|
||||
int deinit();
|
||||
|
||||
// example: topic=xxx&topic=yyy&api=fetch
|
||||
// example: api=commit
|
||||
@@ -147,14 +145,14 @@ public:
|
||||
|
||||
WFKafkaTask *create_kafka_task(int retry_max, kafka_callback_t cb);
|
||||
|
||||
void set_config(protocol::KafkaConfig conf);
|
||||
|
||||
public:
|
||||
/* If you don't leavegroup manually, rebalance would be triggered */
|
||||
WFKafkaTask *create_leavegroup_task(int retry_max,
|
||||
kafka_callback_t callback);
|
||||
|
||||
public:
|
||||
virtual ~WFKafkaClient();
|
||||
|
||||
protocol::KafkaMetaList *get_meta_list();
|
||||
|
||||
protocol::KafkaBrokerList *get_broker_list();
|
||||
|
||||
Reference in New Issue
Block a user