[rabbitmq-discuss] Calls to management functions

Ben Hood 0x6e6562 at gmail.com
Mon Jul 9 10:39:03 BST 2007


> > To achieve (b), maybe I can use the same as (a), but implement my own
> > listener that invokes the rabbit internal API (don't know whether this
> > is re-inventing the wheel).
>
> Indeed that would be re-inventing the wheel. I prefer your original
> approach of using RabbitMQ's management service. Yes it is experimental
> and incomplete, but it is a reasonable foundation you can build on. We'd
> be happy to incorporate your enhancements into the main code base.

Speaking of re-inventing the wheel, I based my RPC handler on the
rabbit_management module, which included a fair amount of copy and
paste. Since rabbit_management is an implementation of the gen_server
behaviour, I was wondering if there is any merit in abstracting out
the template callbacks (i.e. handle_management_message() and reply()
), so that this could be more reuseable with different (a) server
functionality and (b) different wireformats. At the moment, this
module can only invoke rabbitmq management calls ( point (a) ) and
only works with JSON ( point (b) ). I don't whether you can have a
behaviour within a behaviour or whether you can have a parameterizable
gen_server implementation.




More information about the rabbitmq-discuss mailing list