|
|
| Author |
Message |
|
| Guest |
Posted: Sat Jun 28, 2008 11:19 pm |
|
|
|
Guest
|
Hi all,
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@myhost
(rabbit@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.
Example:
$ cat ~/.erlang.cookie
BGPCXKVWOUBNYKCYMHBF
$ erl -sname test |
|
|
| Back to top |
|
| Guest |
Posted: Sun Jun 29, 2008 7:23 am |
|
|
|
Guest
|
Edwin,
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@myhost
> (rabbit@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@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.
Matthias.
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
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
|
|
|