I have found out the various commands which I need to invoke to get the data exposed via rabbitmqctl. Have been able to get the values via the JInterface for some of them. But for queue, exchange related information I am not able to get things via JInterface. The erlang command which I invoke to get the list of exchanges : <br>
rpc:call(rabbit@server,rabbit_exchange,info_all,[&lt;&lt;&quot;/&quot;&gt;&gt;],3000)]<br><br>The above command represented in JInterface code :<br><br><br>������� OtpSelf self = new OtpSelf(&quot;client&quot;, &quot;rathitest&quot;);<br>
������� OtpPeer other� = new OtpPeer(&quot;rabbit@server&quot;);<br>������� OtpConnection connection = self.connect(other);<br>� � � � OtpErlangObject [] obj = {new OtpErlangAtom(&quot;&lt;&lt;\&quot;/\&quot;&gt;&gt;&quot;)} <br>
������� OtpErlangList� arg = new OtpErlangList(obj); <br>������� connection.sendRPC(&quot;rabbit_exchange&quot;,&quot;info_all&quot;,arg);<br><br>When I invoke the above given code it gives : <br><br>test :� receiveRPC{badrpc,{&#39;EXIT&#39;,{function_clause,[{rabbit_misc,r,[&#39;&lt;&lt;\&quot;/\&quot;&gt;&gt;&#39;,exchange]},{rabbit_exchange,list,1},{rabbit_exchange,map,2},{rpc,&#39;-handle_call/3-fun-0-&#39;,5}]}}}<br>
<br>Can anybody please suggest what is going wrong here.<br><br>thanks &amp; regards,<br>rathi <br><br><br><br><div class="gmail_quote">On Tue, Mar 24, 2009 at 1:32 AM, Matthias Radestock <span dir="ltr">&lt;<a href="mailto:matthias@lshift.net">matthias@lshift.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Chris,<div class="im"><br>
<br>
Chris Pettitt wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
A few weeks back I was looking at using JInterface to create a JMX<br>
interface for RabbitMQ. I still haven&#39;t had cycles to work on it, but<br>
one of the immediate issues I saw was that I could not use<br>
rabbitmq_control.erl (the actual module for rabbitmqctl) directly,<br>
because it does not return the results, but instead prints them to<br>
stdout. You can make the same RPC calls that rabbitmqctl does though<br>
to get the results.<br>
</blockquote>
<br></div>
rabbit_control.erl is just a thin wrapper around the internal APIs. It deals with option parsing and result presentation. So calling the internal APIs directly, as you suggest, is indeed the way to go if you want to expose the rabbit_control functionality programmatically.<br>
<font color="#888888">
<br>
<br>
Matthias<br>
<br>
</font></blockquote></div><br>