工厂方法'经纪人'抛出异常;嵌套异常是java.io.IOException:未识别传输方案:[ws]

问题描述 投票:0回答:1

我正在尝试使用activemq服务器配置websocket但我得到了上述错误。我已经替换了localhost机智0.0.0.0但是它没有用.Below是我的代码请看看

@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
1个回答
0
投票

这可能会发生,因为基于HTTP和WS的传输所需的依赖关系不包含在代理的类路径中。您应该确保使用依赖项中列出的“activemq-http”模块创建代理,例如maven pom文件或IDE设置。

© www.soinside.com 2019 - 2024. All rights reserved.