当前位置: 首页 > news >正文

做虚假网站犯法吗苏州首页排名关键词优化

做虚假网站犯法吗,苏州首页排名关键词优化,免费做试用的网站,做外贸有免费的网站吗在测试的过程中,心血来潮,想要测试下新topic中还没被消费的消息。专门查了下ai,奈何一本正经的胡说八道,浪费了点时间。现在记录下: 解决topic缺失时项目无法启动 , 报错: Topic(s) [……] is/a…

        在测试的过程中,心血来潮,想要测试下新topic中还没被消费的消息。专门查了下ai,奈何一本正经的胡说八道,浪费了点时间。现在记录下:

  1.     解决topic缺失时项目无法启动 , 报错: Topic(s) [……] is/are not present and missingTopicsFatal is true  
  2.  指定消息消费的区间
@Configuration
@Primary
public class CommonKafkaConfig extends KafkaProperties {@Value("${spring.kafka.concurrency}")public int concurrency;@Value("${spring.kafka.poll-timeout-ms}")public long pollTimeout;@Value("${spring.kafka.consumer.auto-offset-reset}")private String autoOffsetReset;@Value("${spring.kafka.consumer.auto-commit-interval-ms}")private String autoCommitInterval;@Value("${spring.kafka.consumer.bootstrap-servers}")private String mpSyncBootstrapServers;@Value("${spring.kafka.consumer.cloud-bootstrap-servers}")private String cloudSyncBootstrapServers;@Value("${spring.kafka.consumer.group-id}")private String mpSyncGroupId;@Value("${spring.kafka.consumer.max-pool-records}")private String maxPoolRecords;@Value("${spring.profiles.active}")String env;@Bean(name = "kafkaListenerContainerFactory")KafkaListenerContainerFactory<ConcurrentMessageListenerContainer<String, String>> kafkaListenerContainerFactory() {ConcurrentKafkaListenerContainerFactory<String, String> factory =new ConcurrentKafkaListenerContainerFactory<>();factory.setConsumerFactory(ConsumerFactory());factory.setConcurrency(concurrency);factory.getContainerProperties().setPollTimeout(pollTimeout);//忽略不存在的topic, 针对报警: // Topic(s) [……] is/are not present and missingTopicsFatal is truefactory.getContainerProperties().setMissingTopicsFatal(false);return factory;}private ConsumerFactory<String, String> ConsumerFactory() {return new DefaultKafkaConsumerFactory<>(ConsumerConfigs());}private Map<String, Object> ConsumerConfigs() {Map<String, Object> props = new HashMap<>();props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, getBootStrap());// 配置的值为:latest: 消费最新的消息。 // earliest:( 表示当没有初始偏移量或者偏移量无效时,)消费者会从最早的可用消息开始消费props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "latest");props.put(ConsumerConfig.AUTO_COMMIT_INTERVAL_MS_CONFIG, autoCommitInterval);props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);props.put(ConsumerConfig.GROUP_ID_CONFIG, mpSyncGroupId);props.put(ConsumerConfig.MAX_POLL_RECORDS_CONFIG, maxPoolRecords);return props;}public String getBootStrap() {if (env.contains("cloud")) return cloudSyncBootstrapServers;return mpSyncBootstrapServers;}private Map<String, Object> producerConfigs() {Map<String, Object> props = new HashMap<>();props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, getBootStrap());props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class);props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class);return props;}private ProducerFactory<String, String> producerFactory() {return new DefaultKafkaProducerFactory<>(producerConfigs());}@Bean(name = "commonKafkaTemplate")public KafkaTemplate<String, String> kafkaTemplate() {return new KafkaTemplate<>(producerFactory());}
}

问题1,日志里会有大量的[warn],如下:

2024-04-02 16:58:32.906 WARN 15652 --- [ errorHandler-4-C-1] org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-69, groupId=errorHandler] Error while fetching metadata with correlation id 973 : {mp.publish.grab.high.priority=UNKNOWN_TOPIC_OR_PARTITION, mp.publish.other=UNKNOWN_TOPIC_OR_PARTITION, mp.publish.grab.low.priority=UNKNOWN_TOPIC_OR_PARTITION}

可以在logback.xml中,加一行配置,忽略日志:


<logger name="org.apache.kafka.clients.NetworkClient" level="ERROR"/>

http://www.hengruixuexiao.com/news/34120.html

相关文章:

  • 许昌网站优化天津seo托管
  • ipad网站开发韩国vs加纳分析比分
  • 怎么修复网站死链购买链接怎么买
  • b2c电商网站开发手机如何制作网站教程
  • 网站权重的提升企业网络营销策略分析案例
  • 南通高端网站建设营销渠道策略有哪些
  • 学什么可以先做网站seo指什么
  • 网站添加cms企业推广是什么意思
  • 香港最新消息新闻seo软件
  • wordpress应用app主题广告优化师工作内容
  • 池州做网站培训网站推广宣传语
  • 网站搭建怎么做百度关键词优化工具
  • 合肥建设网站查询怎样申请自己的电商平台
  • 易网官方网站郑州网站建设推广优化
  • 论坛网站论坛网站建设建设常州seo
  • 潍坊seo网站推广市场营销策略包括哪些策略
  • 龙华网网站今日热点头条新闻
  • 专门做网站的公司叫什么比较成功的网络营销案例
  • 广安网站建设公司百度指数的作用
  • 网站制作三级页面打造龙头建设示范
  • 建筑工程资料网站营销型网站外包
  • wordpress复古三栏主题推广关键词优化公司
  • 计算机网站开发毕业论文题目最近七天的新闻重点
  • 西宁做网站网站建设公司简介
  • 产品营销型网站建设建设公司网站大概需要多少钱?
  • 网站建设任务百度引擎入口官网
  • 刚刚封城最新消息2021北京网络优化推广公司
  • 网站添加qq聊天绍兴seo排名外包
  • 吉林沈阳网站建设品牌seo培训咨询
  • 东莞做创意网站百度爱采购官方网站