ruby - ruby-kafka: is it possible to publish to two kafka instances at the same time
问题描述
Current flow of the project that I'm working on involves pushing to a local kafka using ruby-kafka
gem.
Now the need arose to add producer for the remote kafka
, and duplicate also messages there.
And I'm looking for a better way, than calling Kafka.new(...)
twice...
Could you please help me, and do you happen to have any ideas?
解决方案
Another approach to consider would be writing the data once from your application, and then asynchronously replicating the message from one Kafka cluster to another. There are multiple ways of doing this including Apache Kafka's MirrorMaker, Confluent's Replicator, Uber's uReplicator etc.
Disclaimer: I work for Confluent.
推荐阅读
- html - 在 Django 视图和模板中执行一些算术后,我得到了错误的值
- python - 为什么在 __exit__ 函数中更改引用不起作用?
- laravel - Laravel 返回注册 ID
- ios - 不要在选项卡开关的导航中重新加载顶部视图中的内容
- c - C API 允许自动和分配的存储
- loops - Python:While循环索引超出范围
- node.js - multer保存文件后修改req.body
- javascript - 使用给定模式验证日期输入 - JS / React
- php - 向 array_map 中的 html_entity_decode 添加标志
- azure - 认知搜索索引器包括所有文件,无论包含列表如何