如何改变主机url websocket配置?



我有一个关于websocket客户端url的问题。我想为我的客户端机器使用远程websocket服务器。

Machine1, Machine2 --->  Remote Websocket Server

我有一个这样的websocket配置。

<websocket:message-broker application-destination-prefix="/app">
<websocket:stomp-endpoint path="/stomp" allowed-origins="*">
<websocket:handshake-handler ref="myHandshakeHandler"/>
<websocket:sockjs client-library-url="https://cdn.jsdelivr.net/npm/sockjs-client@1/dist/sockjs.min.js"/>
</websocket:stomp-endpoint>

<websocket:simple-broker prefix="/topic,/queue"/>
<websocket:client-inbound-channel>
<websocket:interceptors>
<ref bean="myInterceptor"/>
</websocket:interceptors>
</websocket:client-inbound-channel>
</websocket:message-broker>

我想发布并获得远程url的websocket操作,所以我可以多个我的gui机器。如何将websocket主机地址localhost改为https://remotemachineurl:61614

我在我的xml中添加了这个配置,我可以连接远程activemq artemis。

<websocket:stomp-broker-relay prefix="/topic,/queue" relay-host="remotehost" relay-port="61614"/>

最新更新