首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何更改主机url websocket配置?

如何更改主机url websocket配置?
EN

Stack Overflow用户
提问于 2021-07-29 17:45:46
回答 1查看 52关注 0票数 0

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

代码语言:javascript
复制
Machine1, Machine2 --->  Remote Websocket Server

我有一个websocket的配置,如下所示。

代码语言:javascript
复制
<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>

我想发布和获取websocket操作的远程url,这样我就可以多个gui机器。如何更改为websocket主机url为https://remotemachineurl:61614localhost

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-08-02 13:02:19

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

代码语言:javascript
复制
<websocket:stomp-broker-relay prefix="/topic,/queue" relay-host="remotehost" relay-port="61614"/>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68573680

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档