StompProtocolAndroid
StompProtocolAndroid copied to clipboard
STOMP protocol via WebSocket for Android
ws订阅
mStompClient = Stomp.over(Stomp.ConnectionProvider.OKHTTP, "ws://192.168.2.1:8888/aaa/liveChat/12345"); mStompClient.connect(); mStompClient.lifecycle().subscribe(lifecycleEvent -> { switch (lifecycleEvent.getType()) { case OPENED: LogUtil.d("打开了"); break; case ERROR: LogUtil.d("出错" + lifecycleEvent.getMessage()); break; case CLOSED: LogUtil.d("关闭"); break; case FAILED_SERVER_HEARTBEAT: LogUtil.d("服务器错误"); break; }...
java.lang.NoSuchMethodError: No static method com_siheal_smartphone_commonlib_stom_client_StompClient$$Lambda$1_lambda$connect$0(Lcom/siheal/smartphone/commonlib/stom/client/StompClient;Ljava/util/List;Lcom/siheal/smartphone/commonlib/stom/LifecycleEvent;)V in class Lcom/siheal/smartphone/commonlib/stom/client/StompClient; or its super classes (declaration of 'com.siheal.smartphone.commonlib.stom.client.StompClient' appears in /data/app/com.siheal.smartphone-1/base.apk) at com.siheal.smartphone.commonlib.stom.client.StompClient$$Lambda$1.accept(Unknown Source) at io.reactivex.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:62) at io.reactivex.internal.operators.flowable.FlowableDoOnLifecycle$SubscriptionLambdaSubscriber.onNext(FlowableDoOnLifecycle.java:79) at io.reactivex.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.drain(FlowableCreate.java:542) at io.reactivex.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.onNext(FlowableCreate.java:466) at...
I have did error but exception in coming and keep crashing. ``` Disposable dispTopic = mStompClient.topic("/exch************" + DataHolder.getInstance().getDirectChannels().get(i).id) .subscribeOn(Schedulers.io()) .doOnError(error -> Log.d(TAG,"The error message is: " + error.getMessage())) .onErrorReturn(error ->...
订阅的回调不走
06-13 16:13:07.650 6619-6662/com.drawthink.websocket D/AbstractConnectionProvider: Receive STOMP message: MESSAGE subscription:0ed378a8-6f26-463e-bd3d-ea0efa299728 destination:/topic/person-user3a4 message-id:T_0ed378a8-6f26-463e-bd3d-ea0efa299728@@session-QGUQcglNz8UDmgqBEblifg@@26 redelivered:false priority:0 persistent:true content-encoding:UTF-8 content-type:text/plain content-length:344 IBQPnGMaRqgx4K0COkaPr3mocykiKNQk9MTneIsL1MceDxKVEPfX9N3fdMM+mG+cagFkSOuXxRZh3o+MyM8q52/v/FSCCQVBTLc7x3gtb5RJySRaB+3IFdv97IUqyltCp0+bgmTzHFmp9yw87RFBK5aWi7Bc4HzVI2HfwK03lqoA/5ly5Qbur0BIys9g2U0hySKGH8g/M6tVS16bHwlTxBPqZKo7UQ8ZXcwz/ajFR8aeI9ThiKdxJjXndo08DHR/1CUgkM5VqNx2EFe3pgk+PG0Z7NFZGYHEu6kwYwY5R+wSh+Xa1CANqzQBXH14TztU6rPdLy+CcXXPnh0WLg917w== Logcatl里面打印出了接收的数据(我们数据是加密过得),但是"/user/topic/person"我订阅的这个回调就没有执行,而且logcat里显示 destination:/topic/person-user3a4好像和我订阅的"/user/topic/person"吧前面的user给去掉了 不清楚怎么回事
Hi there. I am using this brilliant library for a stomp connection on android. Everything works for sending and subscribing message expect when I tries to send long messages to...
Hi I'm trying to use the library in a foreground service in Android 7.0 device. I have initialized and connected to the server successfully. But after sending one message, I...
Hi! I'm trying to include this library to my project like this: jitpack.io https://jitpack.io and this: com.github.NaikSoftware StompProtocolAndroid 1.6.4 But something seems to be wrong, because nothing is being imported....
use okhttp3.WebSocket Stomp connection error java.lang.Exception: java.net.ProtocolException: Expected HTTP 101 response but was '200 OK' use org.java_websocket.WebSocket onClose: code=-1 reason=draft org.java_websocket.drafts.Draft_17@f2ec968 refuses handshake remote=false use socketjs to connect is success...
I am trying to connect to my server which is over Https but doesnt have a certificate yet. I am getting the following error " javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for...
I use config.enableStompBrokerRelay("/topic", "/queue", "/exchange"); replace config.enableStompBroker("/topic", "/queue", "/exchange"); then it doesn·t work