|
|
| Author |
Message |
|
| Guest |
Posted: Tue Oct 13, 2009 2:47 am |
|
|
|
Guest
|
Hey all,
I'm trying to query my rabbitmq broker from java and I am able to make the
simple example calls that I found at
http://leftrightfold.com/2009/04/26/how-to-build-rabbit-management-console/,
but when I try a more complex call i get no response.
I'm trying to call the list_queues method with the following code.
...
OtpSelf self = new OtpSelf("guest", "myCookie");
OtpPeer other = new OtpPeer("rabbit@mercury");
OtpConnection connection = self.connect(other);
OtpErlangObject obj = new OtpErlangBinary((byte)47);
// the magic 47 was in reference to the answer I found at
//
http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2009-April/003265.html
// though I am unsure it is behaving properly
connection.sendRPC("rabbit_amqqueue", "info_all", new OtpErlangList(obj));
OtpMsg receiveMsg = connection.receiveMsg();
System.out.println(receiveMsg.getMsg());
...
However the output is always {rex, []}. If I try connection.receiveRPC() the
received data is just [].
But when I hop over to the command line and type rabbitmqctl list_queues I
get
Listing queues ...
SimpleQueue 501
...done.
Also, when I try and go into erlang [erl, no parameters] and type
rpc:call(rabbit@mercury, rabbit_amqqueue, info_all, [<<"/">>]).
I get
{badrpc, nodedown}
Any thoughts on what might be causing my java code to not work?
Thanks,
Brian
Note: In case you're wondering I'm on Ubuntu 9.0.4.
--
View this message in context: http://www.nabble.com/Having-trouble-connecting-via-jInterface-tp25866384p25866384.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
_______________________________________________
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 |
|
| Guest |
Posted: Tue Oct 13, 2009 10:38 am |
|
|
|
Guest
|
Brian,
Try connection.receiveRPC() instead of |
|
|
| Back to top |
|
| Guest |
Posted: Tue Oct 13, 2009 3:07 pm |
|
|
|
Guest
|
|
| Back to top |
|
| Guest |
Posted: Wed Oct 14, 2009 12:26 am |
|
|
|
Guest
|
|
| 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
|
|
|