All Projects → li7nux → spring-boot-kafka-websocket

li7nux / spring-boot-kafka-websocket

Licence: Apache-2.0 License
spring boot kafka websocket demo

Programming Languages

java
68154 projects - #9 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to spring-boot-kafka-websocket

agile-wroking-backend
AgileWorking 是一个团队协作的微信小程序,此工程为小程序的后台实现
Stars: ✭ 67 (+272.22%)
Mutual labels:  springboot
SecExample
JAVA 漏洞靶场 (Vulnerability Environment For Java)
Stars: ✭ 228 (+1166.67%)
Mutual labels:  springboot
SpringBoot-Learn
Spring Boot 入门
Stars: ✭ 62 (+244.44%)
Mutual labels:  springboot
subtitles-view
基于javaFX的简单字幕处理桌面程序,集成在线翻译及语音转换
Stars: ✭ 368 (+1944.44%)
Mutual labels:  springboot
Keyist-Ecommerce
🔑 A simple ecommerce site powered with Spring Boot + Angular 10 + Ngrx + OAuth2
Stars: ✭ 220 (+1122.22%)
Mutual labels:  springboot
smart-cloud-examples
基于springcloud的脚手架(smart-cloud)示例,支持服务合并部署与拆分部署、接口加解密签名、日志数据脱敏、接口数据mock、接口文档自动生成、请求幂等校验、接口日志&&sql日志切面打印、分表分库分布式事务等
Stars: ✭ 23 (+27.78%)
Mutual labels:  springboot
SpringBootIntegration
SpringBoot集成学习项目 SpringBoot Integration
Stars: ✭ 20 (+11.11%)
Mutual labels:  springboot
spring-security-mybatis-demo
A simple demo for Spring Security with Mybatis .
Stars: ✭ 48 (+166.67%)
Mutual labels:  springboot
active4j
Active4j-boot是基于SpingBoot2.0轻量级的java快速开发框架。以Spring Framework为核心容器,Spring MVC为模型视图控制器,Mybatis Plus为数据访问层, Apache Shiro为权限授权层, Redis为分布式缓存,Quartz为分布式集群调度,layui作为前端框架并进行前后端分离的开源框架
Stars: ✭ 32 (+77.78%)
Mutual labels:  springboot
spring-boot-mongo-docker
Spring Boot, Mongo and Docker. Run all with a single command.
Stars: ✭ 16 (-11.11%)
Mutual labels:  springboot
permission
前后端分离的后台权限管理系统,基于Spring Boot, Shiro, Vue, Element实现,预览地址http://123.206.82.234/#/login
Stars: ✭ 44 (+144.44%)
Mutual labels:  springboot
aliyun-sms
阿里云 SMS 短信 Java SDK 封装
Stars: ✭ 67 (+272.22%)
Mutual labels:  springboot
compose-pay
🔱 HA distributed payment gateway. 高可用分布式支付网关/支付前置/支付系统/微信/支付宝
Stars: ✭ 21 (+16.67%)
Mutual labels:  springboot
mzt-biz-log
支持Springboot,基于注解的可使用变量、可以自定义函数的通用操作日志组件
Stars: ✭ 628 (+3388.89%)
Mutual labels:  springboot
springboot2-reactive-kotlin
A simple counter using Spring Boot 2 and Kotlin
Stars: ✭ 19 (+5.56%)
Mutual labels:  springboot
learn-java-demo
java学习demo
Stars: ✭ 17 (-5.56%)
Mutual labels:  springboot
spring-security-passwordless
Passwordless authentication example application using Spring Boot and Spring Security
Stars: ✭ 112 (+522.22%)
Mutual labels:  springboot
primo
primo轮子中心,为开发效率翻滚。(Java、Spring)一些自动生成代码的插件,缓存、限流、接口等快速接入的中间件也会逐渐弄起来
Stars: ✭ 74 (+311.11%)
Mutual labels:  springboot
springboot
🌿 springboot 分析与学习 & 入门示例 & 图文教程,本 Spring Boot 系列文章基于 Spring Boot 版本 v2.x 进行学习分析。 所有项目示例都有对应的文章介绍,可以直接点击 https://www.wdbyte.com 阅读。
Stars: ✭ 104 (+477.78%)
Mutual labels:  springboot
canal-client
spring boot canal starter 易用的canal 客户端 canal client
Stars: ✭ 130 (+622.22%)
Mutual labels:  springboot

项目介绍

一个例子,使用 spring boot 构建一个应用,从 kafka 队列中获取要推送的内容,通过`websocket`将内容推送到`web`端。

项目依赖安装

项目依赖

  • kafka

  • zookeeper

zookeeper 安装

  • 下载 zookeeper

  • 解压, 进入 conf

  • zoo_sample.cfg 重命名为 zoo.cfg

  • 编辑 zoo.cfg, 指定 dataDir

  • 运行 cmd, 进入 bin`目录,输入`zkServer.cmd,启动 zookeeper.

kafka 安装

  • 下载 kafka

  • 解压

  • 运行 cmd, 输入 输入bin\windows\kafka-server-start.bat config\server.properties,启动 kafka

  • 测试:

    • 运行以下命令

kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test1

kafka-console-producer.bat --broker-list localhost:9092 --topic test1

kafka-console-consumer.bat --zookeeper localhost:2181 --topic test1

项目运行

  • 启动项目

  • 使用浏览器访问 http://localhost:8080/ws,点击 连接

  • 通过运行单元测试 KafkaProducerTest 或者发送 post 请求到 /message/send

  • 在浏览器会看到发送的内容

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].