[rabbitmq-discuss] How can we check that rabbitMQ server is running using java code?

1,066 views
Skip to first unread message

cheepu

unread,
Feb 18, 2011, 6:23:57 AM2/18/11
to rabbitmq...@lists.rabbitmq.com

Hi,
How can i program my java code that will give information that RabbitMQ
server is running or not?

Thanks
--
View this message in context: http://old.nabble.com/How-can-we-check-that-rabbitMQ-server-is-running-using-java-code--tp30957788p30957788.html
Sent from the RabbitMQ mailing list archive at Nabble.com.

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq...@lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

Jerry Kuch

unread,
Feb 18, 2011, 6:19:41 PM2/18/11
to cheepu, rabbitmq...@lists.rabbitmq.com
> Hi,
> How can i program my java code that will give information that RabbitMQ
> server is running or not?
>

Hi, Cheepu...

From where are you trying to find out whether the Rabbit broker is
running or not? If you're trying to determine this from a remote Java
client, just seeing that the client can't connect to Rabbit at its
expected host and port by the exception that will be thrown if the
broker can't be reached ought to be sensible. After all, if there's
nothing responding, there's not much more your remote application can
do.

If your Java code is a process on the same box, you may have a few
more options, including looking for the Erlang 'beam' process that
Rabbit is running in, exec-ing 'rabbitmqctl status', etc.

Best regards,
Jerry

Reply all
Reply to author
Forward
0 new messages