Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscribe to a topic that received data too soon, not called its callback method #168

Open
cedb777 opened this issue May 4, 2020 · 0 comments

Comments

@cedb777
Copy link

cedb777 commented May 4, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant