1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Rust流处理引擎测试配置
# 这个配置文件用于测试engine.rs的功能
# 日志配置
logging:
level: "debug" # 设置为debug级别以查看更多日志信息
json_format: false
include_location: true
# 指标收集配置
metrics:
enabled: true
type_name: "prometheus"
prefix: "rust_stream_engine_test"
tags:
env: "test"
service: "engine_test"
interval_secs: 5
# 流配置
streams:
# 测试流配置 - 使用内存输入和标准输出
- input:
type: "memory"
# 内存输入配置,提供一些测试消息
messages:
- '{"id": 1, "content": "测试消息1", "timestamp": 1625097600}'
- '{"id": 2, "content": "测试消息2", "timestamp": 1625097601}'
- '{"id": 3, "content": "测试消息3", "timestamp": 1625097602}'
- '{"id": 4, "content": null, "timestamp": 1625097603}'
- '{"id": 5, "content": "测试消息5", "timestamp": 1625097604}'
# 处理管道配置
pipeline:
thread_num: 1
processors:
- type: "filter"
condition_type: "content"
condition: "null"
invert: false
# 输出配置 - 使用标准输出便于观察结果
output:
type: "stdout"
append_newline: true
# 第二个测试流 - 使用文件输入和文件输出
# - input:
# type: "file"
# # 文件输入配置
# file:
# path: "./examples/test_input.txt"
# max_buffer: 65536
# delimiter: "\n"
# # 处理管道配置
# # pipeline:
# # processors:
# # # 简单的映射处理
# # - mapping:
# # script: |
# # root.line = this
# # root.line_length = len(this)
# # root.processed = true
# # 输出配置
# output:
# file:
# path: "./examples/test_output.txt"
# append: false
# # 缓冲区配置
# buffer:
# memory:
# limit: 1000