[英]Kafka - collect logs from multiple servers. Should each producer running on write to the same topic?
I am learning to use Kafka. 我正在学习使用Kafka。 I would like to implement a centralized log service using Kafka.
我想使用Kafka实现集中式日志服务。 I have multiple servers running my application, I would like my application to write their log to Kafka (ie producers) and then a consumer on the other side to read the logs back.
我有多个运行我的应用程序的服务器,我希望我的应用程序将它们的日志写到Kafka(即生产者),然后在另一侧的消费者写回日志。 I would like to use the same topic for all my applications.
我想对所有应用程序使用相同的主题。 For example, I would like my application to write to a topic called "AppLog" and then have the consumer just read the AppLog topic back.
例如,我希望我的应用程序写一个名为“ AppLog”的主题,然后让使用者只读回AppLog主题。
Does Kafka support multiple producers writing to the same topic? Kafka是否支持多个制作人编写同一主题?
Note: The relative sequences of the log does not matter to me. 注意:日志的相对顺序对我来说无关紧要。
Any help is appreciated. 任何帮助表示赞赏。 Thanks ahead.
谢谢你
Yes, you can have as many producers as you want writing to the same topic. 是的,您可以为同一主题编写尽可能多的制作人。 To improve parallelism you can scale your topic increasing the number of partitions and use more brokers (Kafka servers) in your cluster.
为了提高并行度,您可以扩展主题以增加分区数,并在群集中使用更多代理(Kafka服务器)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.