Bento迎来大变身
嘿,🫵 你,记得⭐给仓库点个星星⭐,不然你没法参加我们的每日抽奖,赢取无声的赞赏哦。
Bento
让花哨的流处理变得平淡无奇
开始使用
用 Go 编写,部署为静态二进制文件,声明式配置。开源且完全云原生。
开始使用探索 Cookbooks
- Mapping
- Multiplexing
- Windowing
- Enrichments
input:gcp_pubsub:project: foosubscription: barpipeline:processors:-mapping:| root.message = this root.meta.link_count = this.links.length() root.user.age = this.user.age.number()output:redis_streams:url: tcp://TODO:6379stream: bazmax_in_flight:20
input:kafka:addresses:[ TODO ]topics:[ foo, bar ]consumer_group: foogroupoutput:switch:cases:-check: doc.tags.contains("AWS")output:aws_sqs:url: https://sqs.us-west-2.amazonaws.com/TODO/TODOmax_in_flight:20-output:redis_pubsub:url: tcp://TODO:6379channel: bazmax_in_flight:20
input:nats_jetstream:urls:[ nats://TODO:4222]queue: myqueuesubject: traffic.light.eventsdeliver: allbuffer:system_window:timestamp_mapping: root = this.created_atsize: 1hpipeline:processors:-group_by_value:value:'${! json("traffic_light_id") }'-mapping:| root = if batch_index() == 0 { { "traffic_light_id": this.traffic_light_id, "created_at": @window_end_timestamp, "total_cars": json("registration_plate").from_all().unique().length(), "passengers": json("passengers").from_all().sum(), } } else { deleted() }output:http_client:url: https://example.com/traffic_dataverb: POSTmax_in_flight:64
input:mqtt:urls:[ tcp://TODO:1883]topics:[ foo ]pipeline:processors:-branch:request_map:| root.id = this.doc.id root.content = this.doc.bodyprocessors:-aws_lambda:function: sentiment_analysisresult_map: root.results.sentiment = thisoutput:aws_s3:bucket: TODOpath:'${! metadata("partition") }/${! timestamp_unix_nano() }.tar.gz'batching:count:100period: 10sprocessors:-archive:format: tar-compress:algorithm: gzip
处理乏味的事情
Bento 通过声明式和单元可测试的配置解决了常见的数据工程任务,例如转换、集成和多路复用。 这使您可以轻松地、增量地调整数据管道以适应需求变化,从而让您专注于更令人兴奋的事情。 它配备了各种processors、一种简洁的 mapping language、无状态windowed processing capabilities 和业界领先的吉祥物。
连接良好
Bento 能够将各种sources和sinks连接在一起,并连接到各种databases、caches、HTTP APIs、lambdas 和更多 processors,使您可以无缝地将其放入现有基础设施中。
使用不同的 API 和服务可能是一项艰巨的任务,在流数据上下文中更是如此。 使用 Bento,可以将这些任务分解并自动并行化为流式 workflow。
可靠且操作简单
交付保证可能是一个棘手的话题。 Bento 使用进程内事务模型处理和确认消息,无需任何磁盘持久化状态,因此在连接到至少一次的 sources 和 sinks 时,即使发生崩溃、磁盘损坏或其他意外服务器故障,它也能保证至少一次的交付。
此行为是默认行为且没有注意事项,这也使得部署和扩展 Bento 更加简单。 但是,简单性并不能消除对可观察性的需求,因此它还公开metrics和tracing事件到您选择的目标。
可扩展
有时,Bento 自带的组件是不够的。 幸运的是,Bento 经过专门设计,可以轻松插入您需要的任何组件。
您可以直接在 Go 中编写插件(推荐),也可以让 Bento 将您的插件作为subprocess 运行。
由
的无聊的人赞助
帮助
社区
版权所有 © 2025 WarpStream. 部分内容在 MIT 许可下使用,来自 Ashley Jeffs.