gpt4 book ai didi

java - Kafka 订阅者客户端 0.10.2 - Spring 集成 - INVALID_TOPIC_EXCEPTION

转载 作者:太空宇宙 更新时间:2023-11-04 11:00:31 25 4
gpt4 key购买 nike

我正在尝试使用 Spring 集成订阅 Kafka 服务器。我可以在应用程序日志中看到 kafka 连接登录。鉴于以下相同。

如果我在这里缺少任何必要的配置,请告诉我。

16:56:02.959 [main] INFO org.apache.kafka.clients.consumer.ConsumerConfig 

ConsumerConfig values:
auto.commit.interval.ms = 100
auto.offset.reset = latest
bootstrap.servers = [10.176.138.40:9092, 10.176.138.208:9092,
10.176.138.169:9092, 10.176.138.184:9092, 10.176.138.188:9092]
check.crcs = true
client.id =
connections.max.idle.ms = 540000
enable.auto.commit = true
exclude.internal.topics = true
fetch.max.bytes = 52428800
fetch.max.wait.ms = 500
fetch.min.bytes = 1
group.id = amqunpnotifyd-dev-thilak
heartbeat.interval.ms = 1000
interceptor.classes = null
key.deserializer = class
org.apache.kafka.common.serialization.StringDeserializer
max.partition.fetch.bytes = 1048576
max.poll.interval.ms = 300000
max.poll.records = 500
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.ms = 5000
request.timeout.ms = 305000
retry.backoff.ms = 100
sasl.jaas.config = null
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.mechanism = GSSAPI
security.protocol = PLAINTEXT
send.buffer.bytes = 131072
session.timeout.ms = 10000
ssl.cipher.suites = null
ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1]
ssl.endpoint.identification.algorithm = null
ssl.key.password = null
ssl.keymanager.algorithm = SunX509
ssl.keystore.location = null
ssl.keystore.password = null
ssl.keystore.type = JKS
ssl.protocol = TLS
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 org.apache.kafka.common.serialization.StringDeserializer


16:56:02.967 [main] INFO org.apache.kafka.clients.consumer.ConsumerConfig ConsumerConfig values:
auto.commit.interval.ms = 100
auto.offset.reset = latest
bootstrap.servers = [10.176.138.40:9092, 10.176.138.208:9092,
10.176.138.169:9092, 10.176.138.184:9092, 10.176.138.188:9092]
check.crcs = true
client.id = consumer-1
connections.max.idle.ms = 540000
enable.auto.commit = true
exclude.internal.topics = true
fetch.max.bytes = 52428800
fetch.max.wait.ms = 500
fetch.min.bytes = 1
group.id = amqunpnotifyd-dev-thilak
heartbeat.interval.ms = 1000
interceptor.classes = null
key.deserializer = class
org.apache.kafka.common.serialization.StringDeserializer
max.partition.fetch.bytes = 1048576
max.poll.interval.ms = 300000
max.poll.records = 500
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.ms = 5000
request.timeout.ms = 305000
retry.backoff.ms = 100
sasl.jaas.config = null
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.mechanism = GSSAPI
security.protocol = PLAINTEXT
send.buffer.bytes = 131072
session.timeout.ms = 10000
ssl.cipher.suites = null
ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1]
ssl.endpoint.identification.algorithm = null
ssl.key.password = null
ssl.keymanager.algorithm = SunX509
ssl.keystore.location = null
ssl.keystore.password = null
ssl.keystore.type = JKS
ssl.protocol = TLS
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
org.apache.kafka.common.serialization.StringDeserializer

即使主题存在,我也会在记录器中收到警告。

WARN org.apache.kafka.clients.NetworkClient Error while fetching metadata with correlation id 3 : {"notification.email.click"=INVALID_TOPIC_EXCEPTION}

由于哪个主题未分配给我的消费者组。

最佳答案

您的主题名称是“notification.email.click”(包括引号)。双引号 (") 不是主题名称的合法字符。

根据Kafka文档,主题命名的合法字符包括:

  1. ASCII 字母数字
  2. .
  3. _
  4. -

source code for 0.10.2定义以下合法字符:

val legalChars = "[a-zA-Z0-9\\._\\-]"
private val maxNameLength = 249
private val rgx = new Regex(legalChars + "+")

关于java - Kafka 订阅者客户端 0.10.2 - Spring 集成 - INVALID_TOPIC_EXCEPTION,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46953898/

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