[rabbitmq-discuss] Queue Info question

Matthias Radestock matthias at lshift.net
Sun Jun 29 08:23:23 BST 2008


Edwin Fine wrote:
> I read a thread (Queue Info) quite a while ago in which a user had 
> problems using the -remsh option on Windows:
> erl -sname temp -remsh rabbit at myhost
> (rabbit at myhost1>rabbit_amqqueue:stat_all().
> I wondered if it might be easier simply to use an erlang rpc call to do 
> the same thing.
> As long as you use the identical erlang.cookie file (or use -setcookie 
> on the command line) that was used to start the rabbitmq daemon, you can 
> call any exported MFA in the context of the daemon using Erlang rpc.

That is all true but not really easier than remsh - if one can get rpc 
to work then remsh should work too.

> Is there any special reason, other than it's easier just to type 
> rabbit_amqqueue:stat_all(), why one would want to use erl -sname temp 
> -remsh rabbit at myhost? Just curious.

Convenience is the only reason. rpc is reasonably concise when calling a 
single function, but once one starts composing functions the expressions 
quickly become unwieldy.


More information about the rabbitmq-discuss mailing list