Description
Hello,
I have a connection to a websocket.
// Connect to the socket server stompClient = Stomp.over(Stomp.ConnectionProvider.OKHTTP, urlSocket, httpHeader); stompClient.withClientHeartbeat(10000); stompClient.withServerHeartbeat(10000); stompClient.connect();
After that, i subscribe to topics and all is working, example :
stompClient.topic(TOPIC_REPLIES).subscribe(topicMessage -> { String result = topicMessage.getPayload(); socketDataManager.parseResultJson(result); });
But, for one topic, I have to receive data when I subscribe to it.
But the callback of the subscribe method is never called ("RESULT FOR THIS TOPIC")
stompClient.topic("/exchange/not/working/topic").subscribe(topicMessage -> { Log.i(TAG, "RESULT FOR THIS TOPIC"); });
I think that I receive the data too soon and so my client is not able to receive the data at the moment it receives it (If the topic is called later, it works fine).
Anyone has had the same issue? Is it a solution to receive the data directly when I subscribe ?
Thank you for your help.