Erlang Mailing Lists

Author Message

<  RabbitMQ mailing list  ~  Exposing rabbit management via AMQP

0x6e6562
Posted: Sat Oct 27, 2007 9:05 pm Reply with quote
User Joined: 12 Jul 2007 Posts: 250
Hi,

Recently on this list there was a question about using access controls
in rabbit, so I've added a first cut of exposing the rabbit management
API via AMQP using the Erlang direct client.

This is intended to be an AMQP alternative to the rabbitmqctl script
and is not my idea, I stole it from Tony.

On the client side it consists of calling the rabbit_access_control
module via RPC over AMQP.

I used Hessian to encode the functions, arguments and replies, but the
mechanism is not necessarily tied to this.

On the server side, it consists of firing up an RPC handler that is
*parameterized* with the rabbit_access_control module.

To test this, you need to:

1. Make sure the 0.1.3 release of the Erlang hessian library
(http://cotton.sourceforge.net/) is in your OTP path as well as the
amqp_erlang library
(http://dev.rabbitmq.com/viewmtn/branch/changes/com.rabbitmq.erlang-client).

2. Fire up the rabbit server and run the rpc handler in the same VM as
the server, e.g.:

erl -mnesia dir WHEREEVER -boot start_sasl -s rabbit

3. Boot the RPC handler:

1> direct_integration_test:start_rabbit_management().

4. Run the test from a different Erlang VM:

1> network_integration_test:rabbit_management_test().

That's it.

As this is only a POC, there are limitations and considerations at the
moment which include:

- I haven't tested every exported function in the
rabbit_access_control control module yet.
- The RPC handler could be registered with the rabbit supervisor so
that you don't have to start it explicitly.
- This piggybacks off an RpcClient pattern that is implemented in the
Erlang client, which is still experimental and may change.
- I haven't tested it with the Java client yet.

amongst others.

Any input, feedback or discussion is appreciated.

Ben

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post recived from mailinglist
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum