pablichjenkov opened a new issue #2581: Android and IOS client support
   I am trying to build a Chat App with the purpose of testing Apache Pulsar. I 
am facing the following problems on both mobile platforms.
   I was trying to run the java client on Android having no success at doing 
so. Pure Java compilation phase passes, however, at some point later the 
Android build process transform all .class files to .dex files, to run on the 
Android VM(ART). During this process I had some errors complaining about some 
classes either being duplicated or corrupted. On top of that we still have the 
risk that the a Classloader failed to resolve certain JAR dependency class at 
run time.
   No Client at all.
   Given above unsuitability I decided to create my own  REST clients. I am 
able to run Pulsar server application on my local environment and send/receive 
messages using the pulsar-client program. However, I have not been able to 
connect to the server from Android.
   The [official 
 says that in order to send a message, a client should create a WebSocket 
connection to the broker endpoint and send a json formatted text with a key 
named **payload**. 
   Following that I should be able to connect to the Producer endpoint with 
bellow code unless I am missing something.:
   *Bellow code uses OkHttpClient library*
   String wsUrl = 
   webSocket = okHttpClient.newWebSocket(wsRequest, wsListener);
   As soon as the connection is started the websocket listener invoke the 
Failure callback method.
   Below message is shown in the logs by the okHttpClient:
   D/OkHttp: <-- HTTP FAILED: unexpected end of stream on 
Connection{, proxy=DIRECT hostAddress=/ 
cipherSuite=none protocol=http/1.1}
   Check code here [sample source 
   **I am running a local standalone instance in a MAC Book Pro and Firewall is 
   Thanks in advance

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to