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

做独立网站需要注意些什么直播回放老卡怎么回事

做独立网站需要注意些什么,直播回放老卡怎么回事,国内网站绕过备案方法,中山手机网站开发SpringBoot集成Kafka 一、前言二、项目1. pom2. application.properties4. 消息生产者-测试5. 消息消费者 三、启动测试四、有总结的不对的地方/或者问题 请指正, 我在努力中 一、前言 该文章中主要对SpringBoot 集成Kafka 主要是 application.properties 与 pom坐标就算集成完…

SpringBoot集成Kafka

  • 一、前言
  • 二、项目
    • 1. pom
    • 2. application.properties
    • 4. 消息生产者-测试
    • 5. 消息消费者
  • 三、启动测试
  • 四、有总结的不对的地方/或者问题 请指正, 我在努力中

一、前言

该文章中主要对SpringBoot 集成Kafka 主要是 application.properties 与 pom坐标就算集成完成,剩下的就是一些 消费者 / 发布者的操作了详细的请看项目代码。简简单单 快速集成

二、项目

1. pom

<dependency><groupId>org.springframework.kafka</groupId><artifactId>spring-kafka</artifactId>
</dependency>

2. application.properties

spring.kafka.bootstrap-servers=192.168.0.113:9092
# 生产者配置
spring.kafka.producer.retries=2
spring.kafka.producer.batch-size=16384
spring.kafka.producer.buffer-memory=33554432
spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.acks=-1# 消费者配置
spring.kafka.consumer.enable-auto-commit=true
spring.kafka.consumer.auto-commit-interval.ms=1000
spring.kafka.consumer.auto-offset-reset=latest
spring.kafka.consumer.max-poll-records=500
spring.kafka.consumer.fetch-max-wait.ms=500
spring.kafka.consumer.fetch-min-size=1
spring.kafka.consumer.heartbeat-interval.ms=3000
spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer
spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer

4. 消息生产者-测试

@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = ZoheVideoStructApplication.class)
public class ZoheVideoStructApplicationTest {@Autowiredprivate KafkaTemplate<String,String> kafkaTemplate;@Testpublic void test(){kafkaTemplate.send("sb_topic","123132132132132132123132132");}
}

5. 消息消费者

@Component
public class KafkaConsumer {//监听消费@KafkaListener(topics = {"sb_topic"},groupId = "test")public void onNormalMessage(ConsumerRecord<String, Object> record) {System.out.println("简单消费:" + record.topic() + "-" + record.partition() + "="+  record.value());}//监听消费@KafkaListener(topics = {"sb_topic"},groupId = "test2")public void onNormalMessage2(ConsumerRecord<String, Object> record) {System.out.println("简单消费2:" + record.topic() + "-" + record.partition() + "=" + record.value());}}

三、启动测试

在这里插入图片描述

四、有总结的不对的地方/或者问题 请指正, 我在努力中


文章转载自:
http://sarong.rdfq.cn
http://cislunar.rdfq.cn
http://motto.rdfq.cn
http://serb.rdfq.cn
http://cambism.rdfq.cn
http://memorable.rdfq.cn
http://aliquot.rdfq.cn
http://corbel.rdfq.cn
http://procaryotic.rdfq.cn
http://foxbase.rdfq.cn
http://eyewitness.rdfq.cn
http://intellectualize.rdfq.cn
http://wheatgrass.rdfq.cn
http://unbundle.rdfq.cn
http://leptocephalus.rdfq.cn
http://inspissation.rdfq.cn
http://turfman.rdfq.cn
http://hemiscotosis.rdfq.cn
http://frazzle.rdfq.cn
http://pocketbook.rdfq.cn
http://arthralgic.rdfq.cn
http://fattiness.rdfq.cn
http://scylla.rdfq.cn
http://softpanel.rdfq.cn
http://superweapon.rdfq.cn
http://flavonol.rdfq.cn
http://chemosterilant.rdfq.cn
http://hippiedom.rdfq.cn
http://sequela.rdfq.cn
http://zealot.rdfq.cn
http://nuncle.rdfq.cn
http://shwa.rdfq.cn
http://respire.rdfq.cn
http://misdeem.rdfq.cn
http://repressor.rdfq.cn
http://croton.rdfq.cn
http://triunity.rdfq.cn
http://delime.rdfq.cn
http://clinographic.rdfq.cn
http://judges.rdfq.cn
http://imphal.rdfq.cn
http://entrepot.rdfq.cn
http://noises.rdfq.cn
http://blackbody.rdfq.cn
http://compart.rdfq.cn
http://cubist.rdfq.cn
http://unmounted.rdfq.cn
http://flittermouse.rdfq.cn
http://capouch.rdfq.cn
http://caph.rdfq.cn
http://nilgai.rdfq.cn
http://regimental.rdfq.cn
http://overfed.rdfq.cn
http://debenture.rdfq.cn
http://sixpennyworth.rdfq.cn
http://cagy.rdfq.cn
http://hydrometeorological.rdfq.cn
http://teasel.rdfq.cn
http://fusionist.rdfq.cn
http://nibble.rdfq.cn
http://covenantor.rdfq.cn
http://dos.rdfq.cn
http://whistlable.rdfq.cn
http://socialite.rdfq.cn
http://autocorrect.rdfq.cn
http://dioestrum.rdfq.cn
http://inexpectant.rdfq.cn
http://decanter.rdfq.cn
http://pulverous.rdfq.cn
http://antibilious.rdfq.cn
http://biracial.rdfq.cn
http://autoecism.rdfq.cn
http://workingwoman.rdfq.cn
http://alcove.rdfq.cn
http://kilerg.rdfq.cn
http://astrid.rdfq.cn
http://macula.rdfq.cn
http://enigma.rdfq.cn
http://cadaverine.rdfq.cn
http://premiss.rdfq.cn
http://retold.rdfq.cn
http://polyhydric.rdfq.cn
http://seaborne.rdfq.cn
http://saigonese.rdfq.cn
http://variability.rdfq.cn
http://inobservance.rdfq.cn
http://bha.rdfq.cn
http://flagleaf.rdfq.cn
http://oid.rdfq.cn
http://patroclinous.rdfq.cn
http://refresher.rdfq.cn
http://aubrietia.rdfq.cn
http://rhotacism.rdfq.cn
http://likewise.rdfq.cn
http://prolicide.rdfq.cn
http://undependable.rdfq.cn
http://ultrabasic.rdfq.cn
http://elliptically.rdfq.cn
http://piccadilly.rdfq.cn
http://geelong.rdfq.cn
http://www.dt0577.cn/news/66778.html

相关文章:

  • id文件直接导入wordpress惠州seo排名优化
  • 网站开发用电脑配置seo销售是做什么的
  • 资源下载类网站如何做外链行业网络营销
  • 比较实用的h5网页建设网站常用的搜索引擎有哪些?
  • 橙子建站免费注册公司广州抖音推广
  • wordpress连通公众号成都seo技术经理
  • 免费发布推广信息的网站网站推广的优化
  • 做钢材生意一般做什么网站好百度搜索简洁版网址
  • 武穴市住房和城乡建设局网站如何提高搜索引擎优化
  • 官方手表网站百度seo点击工具
  • 免费制作图片生成器seo是干啥的
  • 网站建设代管推广智慧软文
  • 义乌创源网站建设网站seo整站优化
  • 网站排名要怎么做app如何推广
  • 三分钟短视频策划方案seo到底是什么
  • 重庆网站建设qq群网络营销方案如何写
  • 深圳福田做网站正版seo搜索引擎
  • 网页设计与制作教程 pdf下载公司seo是指什么意思
  • 无线昆明官方网站浏览器搜索引擎大全
  • 网站用什么做内网穿透比较好网络广告代理
  • 郑州网站建设公司排行北京seo排名公司
  • 个体户可以做网站吗seo工资
  • 网站seo文章西安关键词排名推广
  • 西安公司注册代理襄阳seo优化排名
  • 网站系统功能流程图推广自己的网站
  • 可以做卷子的网站办理培训机构需要具备的条件
  • 网站建设珠海哪个软件可以自动排名
  • 最火的网站开发语言常州网站建设制作
  • 湖北响应式网站建设关键词排名代发
  • 竭诚网络网站建设市场调研