gpt4 book ai didi

java - Kafka Java 消费者被标记为组死亡

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:35:35 24 4
gpt4 key购买 nike

我正在使用 Java 消费者来消费来自主题(kafka 版本 0.10.0.1)的消息,如果我在 docker 容器之外运行它们,它会正常工作。但是,当我在 docker 容器中执行它们时,这些组将被标记为已死亡并显示消息

Marking the coordinator local.kafka.com:9092 (id: 2147483647 rack: null) dead for group my-group

我的消费者配置如下:-

metadata.max.age.ms = 300000
partition.assignment.strategy =[org.apache.kafka.clients.consumer.RangeAssignor]
reconnect.backoff.ms = 50
sasl.kerberos.ticket.renew.window.factor = 0.8
max.partition.fetch.bytes = 1048576
bootstrap.servers = [192.168.115.128:9092, 192.168.115.128:9093]
ssl.keystore.type = JKS
enable.auto.commit = true
sasl.mechanism = GSSAPI
interceptor.classes = null
exclude.internal.topics = true
ssl.truststore.password = null
client.id = consumer-1
ssl.endpoint.identification.algorithm = null
max.poll.records = 2147483647
check.crcs = true
request.timeout.ms = 40000
heartbeat.interval.ms = 3000
auto.commit.interval.ms = 5000
receive.buffer.bytes = 65536
ssl.truststore.type = JKS
ssl.truststore.location = null
ssl.keystore.password = null
fetch.min.bytes = 1
send.buffer.bytes = 131072
value.deserializer = class org.apache.kafka.common.serialization.StringDeserializer
group.id = my-group
retry.backoff.ms = 100
sasl.kerberos.kinit.cmd = /usr/bin/kinit
sasl.kerberos.service.name = null
sasl.kerberos.ticket.renew.jitter = 0.05
ssl.trustmanager.algorithm = PKIX
ssl.key.password = null
fetch.max.wait.ms = 500
sasl.kerberos.min.time.before.relogin = 60000
connections.max.idle.ms = 540000
session.timeout.ms = 30000
metrics.num.samples = 2
key.deserializer = class org.apache.kafka.common.serialization.StringDeserializer
ssl.protocol = TLS
ssl.provider = null
ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1]
ssl.keystore.location = null
ssl.cipher.suites = null
security.protocol = PLAINTEXT
ssl.keymanager.algorithm = SunX509
metrics.sample.window.ms = 30000
auto.offset.reset = earliest

auto.commit 属性设置为 falsepoll.timeout 设置为 10000。有人可以指出我错在哪里吗?

最佳答案

这可能是您的 advertised.listener(代理配置)或缺少它,在您的消费者中的 boostrap.servers 的第一次发现调用后向消费者传回不正确的 URL。

这会导致消费者为其余的 RPC 调用使用不正确的 URL。

关于java - Kafka Java 消费者被标记为组死亡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39992355/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com