[rabbitmq-discuss] RabbitMQ Java Client 2.3.1 on Android
simon at rabbitmq.com
Fri Feb 11 10:47:21 GMT 2011
On 08/02/11 12:38, Denis Conan wrote:
> my objective is to run the Java Client on Android.
> Do not hesitate to tell me if I started off with the wrong idea.
That's... not unreasonable. We don't guarantee that the Java client will
run on Android (in particular we don't test it).
> I didn't see any specific release for Android. So, I took the Java
> Client for J2SE. I was able to adapt the previous version 2.2.0 of the
> Java Client for running on Android: removal of packages json and
> jsonrpc, and correct a call to super in the constructor of the class
Ironically I think that might be fixed in 2.3.1 (it was also
incompatible with Java 1.5).
> As I see, the new version 2.3.1 now has authentication with SASL.
> Unfortunately, there is no package javax.security.sasl in Android JRE.
> So, I tried to manage this lack by replacing the classes of this package
> by the ones in aSMACK (http://code.google.com/p/asmack/). The
> compilation is ok, but the execution throws the following exception.
...but it would be a pity if the introduction of more SASL mechanisms
were to make it unusable on Android.
> java.io.IOException: No compatible authentication mechanism found -
> server offered [PLAIN AMQPLAIN]
So whatever SASL implementation you've cooked up somehow does not
support PLAIN (I would not expect it to support AMQPLAIN).
This seems odd, as it looks like Smack contains support for PLAIN:
If you can't get this working, then you can of course stick with the
2.2.0 client and an upgraded server. But being stuck with an old client
isn't fun, so I'll have a think about how easy it would be to patch the
old homebrew SASL back in for Android.
Staff Engineer, RabbitMQ
SpringSource, a division of VMware
More information about the rabbitmq-discuss