maven-parent

this is parent project

License

License

GroupId

GroupId

com.github.zipu888
ArtifactId

ArtifactId

mid-service-sdk
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

maven-parent
this is parent project
Project URL

Project URL

http://github.com/zipu888
Source Code Management

Source Code Management

https://github.com/zipu888/push-msg-web.git

Download mid-service-sdk

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.zipu888/mid-service-sdk/ -->
<dependency>
    <groupId>com.github.zipu888</groupId>
    <artifactId>mid-service-sdk</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.zipu888/mid-service-sdk/
implementation 'com.github.zipu888:mid-service-sdk:1.0'
// https://jarcasting.com/artifacts/com.github.zipu888/mid-service-sdk/
implementation ("com.github.zipu888:mid-service-sdk:1.0")
'com.github.zipu888:mid-service-sdk:jar:1.0'
<dependency org="com.github.zipu888" name="mid-service-sdk" rev="1.0">
  <artifact name="mid-service-sdk" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.zipu888', module='mid-service-sdk', version='1.0')
)
libraryDependencies += "com.github.zipu888" % "mid-service-sdk" % "1.0"
[com.github.zipu888/mid-service-sdk "1.0"]

Dependencies

provided (6)

Group / Artifact Type Version
com.alibaba : fastjson jar 1.2.71
org.springframework : spring-core jar 5.2.5.RELEASE
org.springframework : spring-beans jar 5.2.5.RELEASE
org.springframework : spring-context jar 5.2.5.RELEASE
org.slf4j : slf4j-api jar 1.7.30
org.springframework.data : spring-data-redis jar 2.1.8.RELEASE

Project Modules

There are no modules declared in this project.

push-msg-web

这个项目为了解决项目中 web应用的实时消息推送而创建

使用了 cometd spring kafka redis

  • cometd 用来推送
  • spring 用来集成
  • kafka 用来接受业务系统需要推送的消息
  • redis 用来绑定cometd用户和业务用户的关系 用来推送给特定的人
  • 利用cometd的channel 来实现批量推送
程序逻辑

利用kafka接受需要推送的消息,通过cometd来推送出去,cometd推送支持long poling 和 websocket方式

######注意

本工程只测试 long poling方式 cometd框架是算学算用,欢迎来喷 项目用的一些jar无法开源出来,你可以把redis和kafka换成自己的实现

Test

Versions

Version
1.0