2017-04-11 103 views
0

我設置我的春天啓動的應用程序如下:春天引導和RabbitMQ的:無法連接到reactor.io.net.impl.netty.tcp.NettyTcpClient

application.properties

spring.rabbitmq.host=127.0.0.1 
spring.rabbitmq.port=5672 
spring.rabbitmq.username=guest 
spring.rabbitmq.password=guest 

WebSocketConfig.java

@Configuration 
@EnableWebSocketMessageBroker 
public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer { 

    @Override 
    public void configureMessageBroker(MessageBrokerRegistry registry) { 

     registry.enableStompBrokerRelay("/topic","/queue/"); 
     registry.setApplicationDestinationPrefixes("/app"); 


    } 
} 

RabbiMQ配置:(安裝在Windows 7)

Protocol Bound to Port 
amqp  127.0.0.1 5672 
clustering ::   25672 
http  0.0.0.0  15672 
http  ::   15672 

當我開始我recive這個錯誤應用程序:

Failed to connect to reactor.io.net.impl.netty.tcp.NettyTcpClient 

出現這種情況,即使我在配置類設置的屬性。

任何想法?

感謝

回答

0

則需要使用啓用RabbitMQ的跺腳經紀人:

rabbitmq-plugins enable rabbitmq_stomp 

此外,端口STOMP是61613,而不是5672