[rabbitmq-discuss] Having trouble connecting via jInterface
Matthew Sackman
matthew at lshift.net
Tue Nov 10 14:59:03 GMT 2009
Hi Brian,
On Mon, Nov 09, 2009 at 09:13:30AM -0800, peckb wrote:
> But, when I run
>
> OtpErlangObject [] objectArray = { new OtpErlangBinary("/") };
>
> connection.sendRPC("rabbit_amqqueue", "info_all", objectArray);
> OtpErlangObject receiveRPC = connection.receiveRPC()
> System.out.println(receiveRPC);
>
> I receive
>
> []
Hmm, this is odd. None of us here have played with the various language
bindings which act as Erlang nodes, so I'm afraid we're struggling to
help you here. I can confirm that rabbit_amqqueue:info_all(<<"/">>) does
indeed work.
> When I run the following...
>
> connection.sendRPC("rabbit_amqqueue", "stat_all", new OtpErlangList());
> OtpErlangObject receiveRPC = connection.receiveRPC()
> System.out.println(receiveRPC);
>
> I receive
>
> [{ok,{resource,#Bin<1>,queue,#Bin<11>},501,0}]
That #Bin<1> is the virtual host. I wonder if the binary you're
constructing in new OtpErlangBinary("/") is somehow different. Maybe try
unpacking the result of the stat_all and check that the values match.
Similarly, that #Bin<11> should be the queue name <<"SimpleQueue">>. If
neither call worked then I'd wonder about host and node names, but the
fact that you have one of them working suggests all of that is set up.
Sorry I can't think of anything else. You may be better off using
rabbitmqctl with the -q (quiet) flag and parsing the output. Also,
use something like wireshark, and compare what your python, erlang
client and java are sending when doing these rpc calls.
Matthew
More information about the rabbitmq-discuss
mailing list