【发布时间】:2015-12-29 04:25:30
【问题描述】:
我有一个使用 Spring 的 Java 应用程序,它使用 Websocket,只要 RabbitMQ 与 tomcat 在同一台机器上运行,它就可以正常工作。
如何设置 RabbitMQ 的 IP?我正在阅读文档,但没有找到。
我现在的配置和one in the documentation很相似
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:websocket="http://www.springframework.org/schema/websocket"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/websocket
http://www.springframework.org/schema/websocket/spring-websocket.xsd">
<websocket:message-broker application-destination-prefix="/app">
<websocket:stomp-endpoint path="/portfolio">
<websocket:sockjs/>
</websocket:stomp-endpoint>
<websocket:simple-broker prefix="/topic, /queue"/>
</websocket:message-broker>
</beans>
如何设置IP?
【问题讨论】:
标签: java spring stomp spring-websocket