StompProtocolAndroid
StompProtocolAndroid copied to clipboard
STOMP protocol via WebSocket for Android
There are two android clients and one server. Open a chat on clients (a connection to the server is made). The first client sent the first message -> the second...
mStompClient = Stomp.over(WebSocket.class, "wss://localhoast:8080/websocket"); mStompClient.topic("/updates/" + userId) .subscribe(new Action1() { @Override public void call(StompMessage topicMessage) { Log.d("socket message: ", topicMessage.getPayload()); } }); mStompClient.connect(); //Error Log. D/WebSocketsConnectionProvider: onMessage: CONNECTED heart-beat:0,0 ��...
I am using okhttp with StompProtocolAndroid to connect an android device to a PC using websocket. The websocket server has been developed by Springboot. It is working fine when I...
NoSuchElementException when STOMP Frame's header line contains SPACE character in name or value part
### Problem There will be NoSuchElementException when StompMessage.from() method parses STOMP frame which contains SPACE character in the name or value part in header line. The main code which caused...
java.lang.IllegalStateException: Not connected yet at ua.naiksoftware.stomp.AbstractConnectionProvider.lambda$send$2$AbstractConnectionProvider(AbstractConnectionProvider.java:96) at ua.naiksoftware.stomp.-$$Lambda$AbstractConnectionProvider$eb5KhWPojPB5RU-WuIuSaj6CtrI.call(Unknown Source:4) at rx.Completable$9.call(Completable.java:495) at rx.Completable$9.call(Completable.java:489) at rx.Completable.unsafeSubscribe(Completable.java:2035) at rx.internal.operators.CompletableOnSubscribeConcatArray$ConcatInnerSubscriber.next(CompletableOnSubscribeConcatArray.java:92) at rx.internal.operators.CompletableOnSubscribeConcatArray$ConcatInnerSubscriber.onCompleted(CompletableOnSubscribeConcatArray.java:68) at rx.Completable$10$1.onCompleted(Completable.java:574) at rx.internal.producers.SingleProducer.request(SingleProducer.java:75) at rx.Subscriber.setProducer(Subscriber.java:209) at rx.internal.operators.OnSubscribeToObservableFuture$ToObservableFuture.call(OnSubscribeToObservableFuture.java:75) at rx.internal.operators.OnSubscribeToObservableFuture$ToObservableFuture.call(OnSubscribeToObservableFuture.java:43) at...
![stompheader](https://user-images.githubusercontent.com/10683274/110926799-cd094280-835f-11eb-8419-2ef0a0d16cfd.jpg) ![图片](https://user-images.githubusercontent.com/10683274/110927075-22ddea80-8360-11eb-8f57-b2a093926b58.png)
E/TAG: Error java.lang.Exception: java.net.ProtocolException: Expected HTTP 101 response but was '401 ' at ua.naiksoftware.stomp.OkHttpConnectionProvider$1.onFailure(OkHttpConnectionProvider.java:83) at okhttp3.internal.ws.RealWebSocket.failWebSocket(RealWebSocket.kt:592) at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:174) at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) Caused by: java.net.ProtocolException: Expected...
io.reactivex.exceptions.OnErrorNotImplementedException: Not connected yet at io.reactivex.internal.observers.EmptyCompletableObserver.onError(EmptyCompletableObserver.java:51) at io.reactivex.internal.operators.completable.CompletableFromCallable.subscribeActual(CompletableFromCallable.java:40) at io.reactivex.Completable.subscribe(Completable.java:2171) at io.reactivex.Completable.subscribe(Completable.java:2159) at ua.naiksoftware.stomp.client.StompClient.lambda$connect$0$StompClient(StompClient.java:121) at ua.naiksoftware.stomp.client.StompClient$$Lambda$0.accept(Unknown Source) at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:63) at io.reactivex.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:308) at io.reactivex.subjects.PublishSubject.onNext(PublishSubject.java:228) at ua.naiksoftware.stomp.AbstractConnectionProvider.emitLifecycleEvent(AbstractConnectionProvider.java:110) at ua.naiksoftware.stomp.OkHttpConnectionProvider$1.onOpen(OkHttpConnectionProvider.java:61) at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:209) at...
## Issue After initialising `mStompClient`, calling `subscribe()` on `mStompClient.topic()` errors out at compile saying: ``` Cannot resolve method 'subscribe()' ``` What could be the issue? ## Details - Java Version...
If server sends binary data with content type application/octet-stream, this data can be lost / incomplete after being converted to a string. Perhaps StompMessage could contain a bytearray field of...