Asher Johnson
Asher Johnson

Reputation: 771

Adding users / virtual hosts to RabbitMQ from Java

Is it possible to dynamically add users and virtual hosts to RabbitMQ using Java? I'm hoping to have the same functionality as rabbitmqctl add_vhost and rabbitmqctl add_user.

My RabbitMQ server is running on the same computer as my java code, but just executing them via Runtime.getRuntime().exec(command); doesn't seem to be working as intended.

Upvotes: 2

Views: 2760

Answers (1)

pinepain
pinepain

Reputation: 12859

There are RESTful HTTP API in Management Plugin which is far more cleaner solution than running shell commands.

Upvotes: 4

Related Questions