0
votes

I just wrote a sprint boot application to connect the rabbitmq and tried to send some test messages, but the connection just be refused. Rabbitmq was installed in the docker which pulled by command docker pull rabbitmq:3-management,

and I started it with command docker run -d --hostname rabbit_test --name rabbitmq -p 15672:15672 -p 5672:5672 rabbitmq:3-management。 However, I can access the web management application with http://ip:15672 and http://localhost:15672.

Here are my configuration in springboot:

spring.rabbitmq.host=ip # I tried with localhost and it just did not work
spring.rabbitmq.port=5762
spring.rabbitmq.username=guest
spring.rabbitmq.password=guest
spring.rabbitmq.publisher-confirms=true

BTW, I have googled but no helpful information.

1
i run the same but i can connect. using vm or which os?Adiii
What operating system are you using? Is the spring application packaged inside docker?yamenk
I have solved this problem with another port.It's weird.Demon Coldmist

1 Answers

1
votes

The default port of rabbitmq server is 5672. Try to use 5672 port