[rabbitmq-discuss] Problem connecting from Android client

Steve Powell steve at rabbitmq.com
Thu Mar 1 11:39:32 GMT 2012


Hi Jay (or should I say KingKong?),

Sorry this is a late response. Please can you put a meaningful subject line on
your posts, in future?

Thank you for referencing Simon Dixon's blog.
 
Perhaps you could supply us with a little more information.

What is the version of RabbitMQ server you are running and on what
platform are you running it?

Have you looked in the server logs to see if there are any messages confirming
that you do indeed connect to it? There might be some errors there if the
connection has failed for some reason (that would show up as a connection being
closed in the client -- so I would expect some exceptions to be thrown, but
you aren't catching unchecked exceptions).

Have you modified the code samples given on that website at all? Of course, you
have modified the server address, but have you changed anything else, like the
exchange type and queue? I see that connectToRabbitMQ() is overridden in the
example and the overriding method does more than just connect, it declares
queues and so on. It would be a good idea to see if those queues are actually
created on the server (rabbitmqctl will help you here).

If you cannot find the problem yourself, then I think some more of your actual
code would be interesting, and we could then try to replicate this on our
IDE Android setup.

Let us know how you get on. Although we don't officially support the Java client
on Android, it would be nice to know that it is capable of working there.

Steve Powell  (a happy bunny)
----------some more definitions from the SPD----------
vermin (v.) Treating the dachshund for roundworm.
chinchilla (n.) Cooling device for the lower jaw.
socialcast (n.) Someone to whom everyone is speaking but nobody likes.

On 26 Feb 2012, at 18:45, jay nanavati wrote:

> Hi everyone,
> 
> I have followed this guide to setup rabbitMQ for android.
> 
> http://simonwdixon.wordpress.com/2011/06/03/getting-started-with-rabbitmq-on-android-part-1/
> 
> 
> 
> The problem I am facing is On the line mConsumer.connectToRabbitMQ() in the ActivityHome, I have changed it to:
> 
> 
> 
> mOutput.append(“\n”+mConsumer.connectToRabbitMQ());
> 
> 
> 
> now when I have the wrong server, it prints false as expected however when I have the write server it does not print anything. In fact it does not even print the @string/hello which it should anyways..
> 
> 
> 
> The app does not consume messages and I think this could be the reason.. Also I have used loger and found out that the error must be on this method because I can logg before the call however I cannot logg anything after the call.
> 
> 
> 
> Any help would be greatly appreciated.. Thanks!
> 
> 
>  
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



More information about the rabbitmq-discuss mailing list