【发布时间】:2018-09-06 01:05:27
【问题描述】:
我正在尝试使用 activemq 服务器配置 websocket,但出现上述错误。我已经用 0.0.0.0 替换了 localhost 但它不起作用。下面是我的代码,请看一下
@Bean
public BrokerService broker() throws Exception {
final BrokerService broker = new BrokerService();
// configure the broker
broker.addConnector( "ws://localhost:61614" );
broker.setPersistent(false);
final ActiveMQTopic topic = new ActiveMQTopic( topicstring );
broker.setDestinations( new ActiveMQDestination[] { topic } );
final ManagementContext managementContext = new ManagementContext();
managementContext.setCreateConnector(true);
broker.setManagementContext(managementContext);
return broker;
}
【问题讨论】:
标签: spring-boot websocket activemq