Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test the connection to RabbitMQ Server?

Tags:

cmd

rabbitmq

amqp

I have the following problem: I need to test connection to RabbitMQ Server which operates on AMQ Protocol, and i need to do it using CMD or something similar, so i can execute the command from script. I don't know if it's possible,the only thing that I found on internet was testing connection through HTTP, and it doesn't work for me.So shortly, I need cmd command that tests connection to RabbitMQ server which uses AMQP.

I hope that someone understands what is my problem, maybe i didn't described it good.

Thanks in advance.

like image 272
Petar Avatar asked Sep 25 '18 09:09

Petar


People also ask

How do I connect to RabbitMQ server?

In order for a client to interact with RabbitMQ it must first open a connection. This process involves a number of steps: Application configures the client library it uses to use a certain connection endpoint (e.g. hostname and port) The library resolves the hostname to one or more IP addresses.

How do I connect to my RabbitMQ remote server?

Create new RabbitMQ user and set permissions To create a new RabbitMQ user to access the RabbitMQ server remotely: Open a browser and navigate to http://localhost:15672/. The RabbitMQ Management login screen displays. Log into RabbitMQ using guest as both the username and password.


1 Answers

I find out what the problem was, and it's kinda silly. You need to establish connection first, but it's kinda tricky to do on local machine. Simply said, you need to simulate communication between, in this case, two scripts. Then, it's easy to list the connections with command:

rabbitmqctl list_connections
like image 57
Petar Avatar answered Oct 01 '22 20:10

Petar