RabbitMq C API : emulating "rabbitmqctl cluster_status -n rabbit@<remote hostname>" from C API

295 views Asked by At

I'm trying to get the list of nodes in a cluster using only the C API.

More or less what the following shell command returns, but from C API

rabbitmqctl cluster_status -n rabbit@<remote hostname>

I'd like to avoid calling rabbitmqctl from the C with system() or popoen() or whatever as I want to avoid having a dependency on the rabbitmq server package on the client side.

Any hint ?

1

There are 1 answers

2
pinepain On BEST ANSWER

Getting RabbitMQ cluster status is not something from AMQP standard and it's not something that rabbitmq-c supports, at least at this time. There is Management Plugin that provides RabbitMQ HTTP API, which is the closest thing you want.

Have a look on RabbitMQ HTTP API client for Ruby readme file, which covers getting cluster status from HTTP API.