首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    kafuka生产者和消费者及配置

    #kafka 生产者配置 #kafka 集群 kafka.bootstrap.servers=ip:端口 #发送端确认模式 kafka.acks=all #发送失败重试次数 kafka.retries =10 #批处理条数 kafka.batch.size=16384 #延迟统一收集,产生聚合,然后批量发送 kafka.linger.ms=100 #批处理缓冲区 kafka.buffer.memory=33554432 #key 序列化 kafka.key.serializer=org.apache.kafka.common.serialization.StringSerializer #value序列化 kafka.value.serializer=org.apache.kafka.common.serialization.StringSerializer #消费端 集群 kafka.bootstrap.servers=IP:端口 #一个用于跟踪调查的ID ,最好同group.id相同 kafka.client.id=MesSystem #Consumer归属的组ID kafka.group.id=debtorInfo #限制每回返回的最大数据条数 kafka.max.poll.records=1000 #是否自动提交 kafka.enable.auto.commit=false #自动提交的频率 kafka.auto.commit.interval.ms=1000 #会话的超时限制 kafka.session.timeout.ms=15000 kafka.key.deserializer=org.apache.kafka.common.serialization.StringDeserializer kafka.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer

    01

    kafka插入失败

    org.springframework.kafka.core.KafkaProducerException: Failed to send; nested exception is org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for zhaochaotest-0: 30031 ms has passed since batch creation plus linger time     at org.springframework.kafka.core.KafkaTemplate$1.onCompletion(KafkaTemplate.java:365)     at org.apache.kafka.clients.producer.internals.ProducerBatch.completeFutureAndFireCallbacks(ProducerBatch.java:204)     at org.apache.kafka.clients.producer.internals.ProducerBatch.done(ProducerBatch.java:187)     at org.apache.kafka.clients.producer.internals.Sender.failBatch(Sender.java:627)     at org.apache.kafka.clients.producer.internals.Sender.sendProducerData(Sender.java:287)     at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:238)     at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:163)     at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for zhaochaotest-0: 30031 ms has passed since batch creation plus linger time

    02
    领券