说明
| source: 2 |
| channel: 1 |
| sink: 1 |
注意:
| sink |
| type: avro |
| hostname: node |
| port |
| |
| source |
| type: avro |
| bind: node1 |
| port |
画图理解

配置文件
服务器1的配置文件
| [root@node1 oneother] |
| |
| |
| a1.sources = r1 |
| a1.sinks = k1 |
| a1.channels = c1 |
| |
| |
| a1.sources.r1.type = netcat |
| a1.sources.r1.bind = node1 |
| a1.sources.r1.port = 44444 |
| |
| a1.sinks.k1.type = avro |
| a1.sinks.k1.hostname = node1 |
| a1.sinks.k1.port = 40000 |
| |
| a1.channels.c1.type = memory |
| a1.channels.c1.capacity = 1000 |
| a1.channels.c1.transactionCapacity = 100 |
| |
| a1.sources.r1.channels = c1 |
| a1.sinks.k1.channel = c1 |
服务器2的配置文件
| [root@node1 twoother] |
| |
| |
| two.sources = r1 |
| two.sinks = k1 |
| two.channels = c1 |
| |
| |
| two.sources.r1.type = spooldir |
| two.sources.r1.spoolDir = /opt/test/ |
| |
| two.sinks.k1.type = avro |
| two.sinks.k1.hostname = node1 |
| two.sinks.k1.port = 40000 |
| |
| two.channels.c1.type = memory |
| two.channels.c1.capacity = 1000 |
| two.channels.c1.transactionCapacity = 100 |
| |
| two.sources.r1.channels = c1 |
| two.sinks.k1.channel = c1 |
聚合的配置文件
| [root@node1 aggre] |
| |
| |
| aggre.sources = r1 |
| aggre.sinks = k1 |
| aggre.channels = c1 |
| |
| |
| aggre.sources.r1.type = avro |
| aggre.sources.r1.bind = node1 |
| aggre.sources.r1.port = 40000 |
| |
| aggre.sinks.k1.type = logger |
| |
| aggre.channels.c1.type = memory |
| aggre.channels.c1.capacity = 1000 |
| aggre.channels.c1.transactionCapacity = 100 |
| |
| aggre.sources.r1.channels = c1 |
| aggre.sinks.k1.channel = c1 |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?