[rabbitmq-discuss] Having trouble connecting via jInterface

peckb brian.peck at lmco.com
Mon Nov 9 17:13:30 GMT 2009


Hey all,

Well I was able to get all of my functionality (all the rabbitmqctl) methods
in python, but now I need to move back to Java.

When I brought up the old code I still am getting the same problems as
before, but I know that there are messages in my queue. 

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}]

which makes sense since I published 501 messages to 'SimpleQueue' on my '/'
vHost

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

[]

They are run right after another (the info_all going first). I seem to be
getting problems only when I have to send in parameters, other functions
that don't require parameters are also working correctly.

Any idea why stat_all is working but info_all does not? Or just how to get
info_all to work?



peckb wrote:
> 
> When I try that I just get [] from the output, which Java is telling me is
> an OtpErlangList with .arity() = 0
> 
> 
> Aaron Feng wrote:
>> 
>> Brian,
>> 
>> Try connection.receiveRPC() instead of OtpMsg receiveMsg =
>> connection.receiveMsg();
>> 
>> Aaron
>> 
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
>> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Having-trouble-connecting-via-jInterface-tp25866384p26270064.html
Sent from the RabbitMQ mailing list archive at Nabble.com.





More information about the rabbitmq-discuss mailing list