我正在尝试使用镜子制造商来复制 __consumer_offsets
主题连同其他主题。
它给出了如下所述的错误。
[2018-10-24 16:16:03,802] ERROR Error when sending message to topic __consumer_offsets with key: 16 bytes, value: 445 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback) org.apache.kafka.common.errors.InvalidTopicException: The request attempted to perform an operation on an invalid topic. [2018-10-24 16:16:03,828] ERROR Error when sending message to topic __consumer_offsets with key: 29 bytes, value: 754 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback) org.apache.kafka.common.errors.InvalidTopicException: The request attempted to perform an operation on an invalid topic.
有没有办法解决这个问题?
在 SlideShare 中的融合演示之一在幻灯片 21 上,它提到了 复制偏移主题 在多个数据中心。有人可以告诉我实现相同目标的可能方法吗?
或者还有其他更好的方法来为 Kafka 备份和恢复策略。
最佳答案
在你的 consumer.config 中添加:
exclude.internal.topics=false
并将其添加到您的 producer.config 中:
client.id=__admin_client
原因是,除非您声明
client.id=__admin_client
,否则生产者不能写入内部主题。由 AdminClient.scala 使用。在这里找到:https://issues.apache.org/jira/browse/KAFKA-6524
关于apache-kafka - Kafka Mirror Maker 无法复制 __consumer_offset 主题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52967654/