简体   繁体   English

使用STOMP Java Client到达spring端点

[英]Using STOMP Java Client to reach a spring endpoint

I want to establish a STOMP connection between my server and a java test client. 我想在我的服务器和Java测试客户端之间建立STOMP连接。 The destination of the websocket would be something like localhost:1234/data/websocket/ . websocket的目标类似于localhost:1234/data/websocket/

None of the java stomp implementations seem to support such an address format. java stomp实现似乎都不支持这种地址格式。 Is there a way to create a STOMP connection to such an endpoint? 有没有办法创建到此类端点的STOMP连接?

You should take a look to this documentation : Using WebSocket to build an interactive web application 您应该看一下本文档: 使用WebSocket构建交互式Web应用程序

Using WebSocket to build an interactive web application 使用WebSocket构建交互式Web应用程序

This guide walks you through the process of creating a "hello world" application that sends messages back and forth, between a browser and the server. 本指南将引导您完成创建“ hello world”应用程序的过程,该应用程序在浏览器和服务器之间来回发送消息。 WebSocket is a very thin, lightweight layer above TCP. WebSocket是TCP之上非常薄,轻便的层。 It makes it very suitable to use "subprotocols" to embed messages. 它非常适合使用“子协议”嵌入消息。 In this guide we'll dive in and use STOMP messaging with Spring to create an interactive web application. 在本指南中,我们将深入研究STOMP消息传递并将其与Spring一起使用,以创建一个交互式Web应用程序。

Finally I decided to use the Spring STOMP client. 最后,我决定使用Spring STOMP客户端。 It was the only client I found, which was able to connect to such a specific endpoint. 这是我找到的唯一一个能够连接到这样的特定端点的客户端。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM