English | 中文
高性能Rust流处理引擎,无缝集成AI能力,提供强大的实时数据处理与智能分析。 它不仅支持多种输入/输出源和处理器,更能轻松加载和执行机器学习模型,实现流式数据和推理、异常检测和复杂事件处理。
ArkFlow 已收录在 CNCF Cloud Native 云原生技术全景图中。
# 克隆仓库
git clone https://github.com/arkflow-rs/arkflow.git
cd arkflow
# 构建项目
cargo build --release
# 运行测试
cargo test
config.yaml:logging:
level: info
streams:
- input:
type: "generate"
context: '{ "timestamp": 1625000000000, "value": 10, "sensor": "temp_1" }'
interval: 1s
batch_size: 10
pipeline:
thread_num: 4
processors:
- type: "json_to_arrow"
- type: "sql"
query: "SELECT * FROM flow WHERE value >= 10"
output:
type: "stdout"
error_output:
type: "stdout"
./target/release/arkflow --config config.yaml
ArkFlow使用YAML格式的配置文件,支持以下主要配置项:
logging:
level: info # 日志级别:debug, info, warn, error
streams: # 流定义列表
- input: # 输入配置
# ...
pipeline: # 处理管道配置
# ...
output: # 输出配置
# ...
error_output: # 错误输出配置
# ...
buffer: # 缓冲配置
# ...
ArkFlow支持多种输入源:
示例:
input:
type: kafka
brokers:
- localhost:9092
topics:
- test-topic
consumer_group: test-group
client_id: arkflow
start_from_latest: true
ArkFlow提供多种数据处理器:
示例:
pipeline:
thread_num: 4
processors:
- type: json_to_arrow
- type: sql
query: "SELECT * FROM flow WHERE value >= 10"
ArkFlow支持多种输出目标:
示例:
output:
type: kafka
brokers:
- localhost:9092
topic:
type: value
value: output-topic
client_id: arkflow-producer
示例:
error_output:
type: kafka
brokers:
- localhost:9092
topic:
type: value
value: error-topic
client_id: error-arkflow-producer
ArkFlow 提供缓冲能力,以处理消息的背压和临时存储:
示例:
buffer:
type: memory
capacity: 10000 # Maximum number of messages to buffer
timeout: 10s # Maximum time to buffer messages
streams:
- input:
type: kafka
brokers:
- localhost:9092
topics:
- test-topic
consumer_group: test-group
pipeline:
thread_num: 4
processors:
- type: json_to_arrow
- type: sql
query: "SELECT * FROM flow WHERE value > 100"
output:
type: kafka
brokers:
- localhost:9092
topic:
type: value
value: processed-topic
streams:
- input:
type: "generate"
context: '{ "timestamp": 1625000000000, "value": 10, "sensor": "temp_1" }'
interval: 1ms
batch_size: 10000
pipeline:
thread_num: 4
processors:
- type: "json_to_arrow"
- type: "sql"
query: "SELECT count(*) FROM flow WHERE value >= 10 group by sensor"
output:
type: "stdout"
ArkFlow 使用 Apache License 2.0 许可证。
Discord: https://discord.gg/CwKhzb8pux
微信社区群:

您可以在群内提出任何需要改进的地方,我们会考虑合理性并尽快修改。 如果您发现 bug 请及时提 issue,我们会尽快确认并修改。
如果你喜欢或正在使用这个项目来学习或开始你的解决方案,请给它一个star⭐。谢谢!
$ claude mcp add arkflow \
-- python -m otcore.mcp_server <graph>