简体   繁体   English

MongoDB Atlas Source Connector 单主题

[英]MongoDB Atlas Source Connector Single Topic

I am using Confluent MongoDB Atlas Source Connector to pull data from MongoDB collection to Kafka.我正在使用 Confluent MongoDB Atlas Source Connector 将数据从 MongoDB 集合中提取到 Kafka。 I have noticed that the connector is creating multiple topics in the Kafka Cluster.我注意到连接器正在 Kafka 集群中创建多个主题。 I need the data to be available on one topic so that the consumer application can consume the data from the topic.我需要一个主题的数据可用,以便消费者应用程序可以使用该主题的数据。 How can I do this?我怎样才能做到这一点?

Besides, why the Kafka connector is creating so many topics?此外,为什么 Kafka 连接器会创建这么多主题? isn't is difficult for consumer applications to retrieve the data with that approach?消费者应用程序使用这种方法检索数据不是很困难吗?

Kafka Connect creates 3 internal topics for the whole cluster for managing its own workload. Kafka Connect 为整个集群创建了 3 个内部主题,用于管理自己的工作负载。 You should never need/want external consumers to use these您永远不需要/希望外部消费者使用这些

In addition to that, connectors can create their own topics.除此之外,连接器还可以创建自己的主题。 Debezium for example creates a "database history topic", and again, this shouldn't be read outside of the Connect framework.例如,Debezium 创建了一个“数据库历史主题”,同样,这不应该在 Connect 框架之外阅读。

Most connectors only need to create one for the source to pull data into, which is what consumers actually should care about大多数连接器只需要为源创建一个以将数据拉入其中,这才是消费者真正应该关心的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM