本文是对《Spring in Action》第十八章 的“18.3 使用STOMP消息”实践记录。
详细的代码在github上:StompBrokerRelayRabbitMQSpringMarco
在实践这部分的时候,最让人抓狂的是,jar依赖,下面列出完整的jar依赖:
注意:本人在使用SpringBoot整合STOMP的时候,引入下面的jar会报错。解决方案是升级netty-all的版本。升级后的版本为: 4.1.22.Final
<dependency>
<groupId>org.webjars</groupId>
<artifactId>stomp-websocket</artifactId>
<version>2.3.3-1</version>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>3.2.8.RELEASE</version>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor

本文介绍了如何在Spring应用中结合STOMP和RabbitMQ,通过STOMP代理中继实现消息传递。详细步骤包括启用RabbitMQ的STOMP插件,配置STOMP设置,并展示了实践后的页面效果。遇到的jar依赖问题和解决方案也一并提及。
最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



