Stomp.js 已过时且不再维护 - 哪个 Stomp 客户端可与 Spring Websockets 一起使用?
Stomp.js is out of date and no longer maintained - which Stomp client to use with Spring Websockets?
令我惊讶的是 Spring WebSocket Support directs users to use stomp.js 的客户端 JavaScript 实现的当前文档。
这个项目在其 GitHub 页面的自述文件中说:
This project is no longer maintained.
If you encounter bugs with it or need enhancements, you can fork it and modify it as the project is under the Apache License 2.0.
存储库自 2015 年 9 月以来没有任何提交(只是将以上内容添加到自述文件),并且自 2014 年 12 月以来没有代码提交,因此在过去 2 年中它实际上已被放弃。
我不确定存储库的 284 个复刻中的哪个是库的稳定和最新版本,而且 Google 搜索似乎没有可行的替代方案。
有人可以推荐一个稳定的替代品吗?
理想情况下,我希望 Spring 团队可以提供一些关于正确的客户端库的方向,以与他们的 STOMP 支持一起使用。
我也一直在想这个问题,但没能找到任何具体的东西。我遇到的最接近的是 webstomp-client
:
https://github.com/JSteunou/webstomp-client
它声称是原始 stomp.js
的一个分支,看起来它正在积极维护。
与问题无关,但与我最近的工作有关,我还发现了 webstomp-client
的一个分支,它也实现了 RxJS 客户端;发布一些链接以防将来对某人有用。
https://github.com/Clanrat/webstomp-client
https://github.com/Clanrat/webstomp-client/blob/master/src/rxclient.js
请检查 https://github.com/stomp-js/stompjs(@stomp/stompjs
在 npm)。它基于原始版本,但修复了已知问题,支持自动重新连接、二进制数据、回调。用 Typescript 编写并作为 UMD 分发(可从 Node 和浏览器使用)。
它还有 RxJS 的变体 (https://github.com/stomp-js/rx-stomp) and Angular (https://github.com/stomp-js/ng2-stompjs)。
这是积极维护的。
https://github.com/stomp-js/stompjs 的维护者似乎已经分叉了他自己的东西(大概是 Deepak Kumar)。其中,'auto-reconnect' 在使用此版本和 SocksJS 的 Safari 中实际上对我不起作用。
var ws = new SockJS(url);
var client = Stomp.over(ws);
client.reconnect_delay = 5000;
因此,我也很难找到 'legit' 和正确支持的版本。但是我在原作者网站 link link 中做了 运行 。所以,我想我会使用这个版本。
希望这能帮助那些迷失在各种非官方分叉版本中的人(就像我一样)结果非常不一致。
令我惊讶的是 Spring WebSocket Support directs users to use stomp.js 的客户端 JavaScript 实现的当前文档。
这个项目在其 GitHub 页面的自述文件中说:
This project is no longer maintained.
If you encounter bugs with it or need enhancements, you can fork it and modify it as the project is under the Apache License 2.0.
存储库自 2015 年 9 月以来没有任何提交(只是将以上内容添加到自述文件),并且自 2014 年 12 月以来没有代码提交,因此在过去 2 年中它实际上已被放弃。
我不确定存储库的 284 个复刻中的哪个是库的稳定和最新版本,而且 Google 搜索似乎没有可行的替代方案。
有人可以推荐一个稳定的替代品吗?
理想情况下,我希望 Spring 团队可以提供一些关于正确的客户端库的方向,以与他们的 STOMP 支持一起使用。
我也一直在想这个问题,但没能找到任何具体的东西。我遇到的最接近的是 webstomp-client
:
https://github.com/JSteunou/webstomp-client
它声称是原始 stomp.js
的一个分支,看起来它正在积极维护。
与问题无关,但与我最近的工作有关,我还发现了 webstomp-client
的一个分支,它也实现了 RxJS 客户端;发布一些链接以防将来对某人有用。
https://github.com/Clanrat/webstomp-client
https://github.com/Clanrat/webstomp-client/blob/master/src/rxclient.js
请检查 https://github.com/stomp-js/stompjs(@stomp/stompjs
在 npm)。它基于原始版本,但修复了已知问题,支持自动重新连接、二进制数据、回调。用 Typescript 编写并作为 UMD 分发(可从 Node 和浏览器使用)。
它还有 RxJS 的变体 (https://github.com/stomp-js/rx-stomp) and Angular (https://github.com/stomp-js/ng2-stompjs)。
这是积极维护的。
https://github.com/stomp-js/stompjs 的维护者似乎已经分叉了他自己的东西(大概是 Deepak Kumar)。其中,'auto-reconnect' 在使用此版本和 SocksJS 的 Safari 中实际上对我不起作用。
var ws = new SockJS(url);
var client = Stomp.over(ws);
client.reconnect_delay = 5000;
因此,我也很难找到 'legit' 和正确支持的版本。但是我在原作者网站 link link 中做了 运行 。所以,我想我会使用这个版本。
希望这能帮助那些迷失在各种非官方分叉版本中的人(就像我一样)结果非常不一致。