#apache-kafka #kafka-consumer-api #azure-eventhub
Вопрос:
Я столкнулся с проблемой, связанной с концентраторами событий Azure для Kafka.
У меня есть потребитель Кафки, обрабатывающий тему сообщения с именем «ABC», которая имеет следующую конфигурацию:
Значения ConsumerConfig:
allow.auto.create.topics = true
auto.commit.interval.ms = 5000
auto.offset.reset = earliest
bootstrap.servers = [xxxx-eventhubs-namespace.servicebus.windows.net:9093]
check.crcs = true
client.dns.lookup = use_all_dns_ips
client.id = consumer-XXXGroupConsumer-3
client.rack =
connections.max.idle.ms = 540000
default.api.timeout.ms = 60000
enable.auto.commit = false
exclude.internal.topics = true
fetch.max.bytes = 52428800
fetch.max.wait.ms = 500
fetch.min.bytes = 1
group.id = XXXGroupConsumer
group.instance.id = null
heartbeat.interval.ms = 3000
interceptor.classes = []
internal.leave.group.on.close = true
internal.throw.on.fetch.stable.offset.unsupported = false
isolation.level = read_uncommitted
key.deserializer = class org.apache.kafka.common.serialization.StringDeserializer
max.partition.fetch.bytes = 52428800
max.poll.interval.ms = 2147483647
max.poll.records = 1000
metadata.max.age.ms = 300000
metric.reporters = []
metrics.num.samples = 2
metrics.recording.level = INFO
metrics.sample.window.ms = 30000
partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor]
receive.buffer.bytes = 65536
reconnect.backoff.max.ms = 1000
reconnect.backoff.ms = 50
request.timeout.ms = 120000
retry.backoff.ms = 100
sasl.client.callback.handler.class = null
sasl.jaas.config = [hidden]
sasl.kerberos.kinit.cmd = /usr/bin/kinit
sasl.kerberos.min.time.before.relogin = 60000
sasl.kerberos.service.name = null
sasl.kerberos.ticket.renew.jitter = 0.05
sasl.kerberos.ticket.renew.window.factor = 0.8
sasl.login.callback.handler.class = null
sasl.login.class = null
sasl.login.refresh.buffer.seconds = 300
sasl.login.refresh.min.period.seconds = 60
sasl.login.refresh.window.factor = 0.8
sasl.login.refresh.window.jitter = 0.05
sasl.mechanism = PLAIN
security.protocol = SASL_SSL
security.providers = null
send.buffer.bytes = 131072
session.timeout.ms = 100000
ssl.cipher.suites = null
ssl.enabled.protocols = [TLSv1.2]
ssl.endpoint.identification.algorithm = https
ssl.engine.factory.class = null
ssl.key.password = null
ssl.keymanager.algorithm = SunX509
ssl.keystore.location = null
ssl.keystore.password = null
ssl.keystore.type = JKS
ssl.protocol = TLSv1.2
ssl.provider = null
ssl.secure.random.implementation = null
ssl.trustmanager.algorithm = PKIX
ssl.truststore.location = null
ssl.truststore.password = null
ssl.truststore.type = JKS
value.deserializer = class KafkaConsumerDeserializer
Потребитель может подписаться на тему «ABC» , но это не удается с приведенной ниже ошибкой:
«Не удалось присоединиться к группе с помощью org.apache.кафка.обычное дело.Исключение KafkaException: Неожиданная ошибка в ответе группы присоединения: Время ожидания запроса истекло.»
[pool-2-thread-1] INFO org.apache.kafka.clients.consumer.KafkaConsumer - [Consumer clientId=consumer-XXXGroupConsumer-3, groupId=XXXGroupConsumer] Subscribed to topic(s): ABC
[pool-2-thread-1] INFO org.apache.kafka.clients.consumer.internals.AbstractCoordinator - [Consumer clientId=consumer-XXXGroupConsumer-3, groupId=XXXGroupConsumer] Discovered group coordinator xxxx-eventhubs-namespace.servicebus.windows.net:9093 (id: 2147483647 rack: null)
[pool-2-thread-1] INFO org.apache.kafka.clients.consumer.internals.AbstractCoordinator - [Consumer clientId=consumer-XXXGroupConsumer-3, groupId=XXXGroupConsumer] (Re-)joining group
[pool-2-thread-1] ERROR org.apache.kafka.clients.consumer.internals.AbstractCoordinator - [Consumer clientId=consumer-XXXGroupConsumer-3, groupId=XXXGroupConsumer] **Attempt to join group failed due to unexpected error: The request timed out.**
[pool-2-thread-1] INFO org.apache.kafka.clients.consumer.internals.AbstractCoordinator - [Consumer clientId=consumer-XXXGroupConsumer-3, groupId=XXXGroupConsumer] **Join group failed with org.apache.kafka.common.KafkaException: Unexpected error in join group response: The request timed out.**