mirror of
https://github.com/sogou/workflow.git
synced 2026-10-17 04:31:07 +08:00
@@ -29,8 +29,9 @@ The program exists automatically after all the tasks are completed, and all the
|
||||
|
||||
In the command, the broker_url may contain several urls seperated by comma(,).
|
||||
|
||||
- For instance, kafka://host:port,kafka://host1:port...
|
||||
- The default value is 9092;
|
||||
- For instance, kafka://host:port,kafka://host1:port... or: **kafkas**://host:port,**kafkas**://host1:port for kafka over SSL;
|
||||
- The default port is 9092 for TCP and 9093 for SSL;
|
||||
- Do not mix 'kafkas://' with "kafka://", otherwise the init function will fail with errno EINVAL;
|
||||
- If you want to use upstream policy at this layer, please refer to [upstream documents](/docs/en/about-upstream.md).
|
||||
|
||||
The following are several Kafka broker_url samples:
|
||||
@@ -41,6 +42,12 @@ kafka://kafka.host:9090/
|
||||
|
||||
kafka://10.160.23.23:9000,10.123.23.23,kafka://kafka.sogou
|
||||
|
||||
kafkas://broker1.kafka.sogou,kafkas://broker2.kafka.sogou
|
||||
|
||||
Illegal broker_url sample (The first one is SSL, and the second one is not):
|
||||
|
||||
kafkas://broker1.kafka.sogou,broker2.kafka.sogou
|
||||
|
||||
# Principles and Features
|
||||
|
||||
Kafka client has no third-party dependencies internally except for the libraries used in the compression. With the high performance of Workflow, When properly configured and in fair environments, tens of thousands of Kafka requests can be processed in one second.
|
||||
|
||||
@@ -28,8 +28,10 @@ Bazel:执行bazel build kafka 编译支持kafka协议的类库;执行bazel b
|
||||
|
||||
其中broker_url可以有多个url组成,多个url之间以,分割
|
||||
|
||||
- 形式如:kafka://host:port,kafka://host1:port...
|
||||
- port默认为9092;
|
||||
- 形式如:kafka://host:port,kafka://host1:port... 或:**kafkas**://host:port,**kafkas**://host1:port代表使用SSL通信。
|
||||
- port的默认值在普通TCP连接下是9092,SSL下为9093。
|
||||
- "kafka://"前缀可以缺省。这时候使用默认使用TCL通信。
|
||||
- 多个url,必须都采用TCP或都采用SSL。否则init函数返回-1,错误码为EINVAL。
|
||||
- 如果用户在这一层有upstream选取需求,可以参考[upstream文档](../docs/about-upstream.md)。
|
||||
|
||||
Kafka broker_url示例:
|
||||
@@ -40,6 +42,12 @@ kafka://kafka.host:9090/
|
||||
|
||||
kafka://10.160.23.23:9000,10.123.23.23,kafka://kafka.sogou
|
||||
|
||||
kafkas://broker1.kafka.sogou,kafkas://broker2.kafka.sogou
|
||||
|
||||
错误的url示例(第一个broker为SSL,第二个broker非SSL):
|
||||
|
||||
kafkas://broker1.kafka.sogou,broker2.kafka.sogou
|
||||
|
||||
# 实现原理和特性
|
||||
|
||||
kafka client内部实现上除了压缩功能外没有依赖第三方库,同时利用了workflow的高性能,在合理的配置和环境下,每秒钟可以处理几万次Kafka请求。
|
||||
|
||||
Reference in New Issue
Block a user