Closed mehtahardikr closed 2 years ago
Hi, can you let me know what do you mean by "old recent messages"? PubNub stores the messages in a queue for some time if they are not received, how old are the messages that you are receiving?
Also, can you check if the problem persists in the latest 4.0.0-beta.1
version?
@are : as per check with 4.0.0-beta.1
and its looks good as per github latest commit it solves timetoken related issue but problem is that can you make it available without null safety as with null safety of beta version its breaking my other dependencies as well.
The issue is: the channel B has 2 messages before i join it and upon join that channel B it sends that 2 messages which was sent before joining of channel B.
Null Safety is backwards compatible, so you can update your Dart version but disable sound Null Safety - this will allow you to use newer dependencies but still have unsound code. Unfortunately we do not plan to backport fixes into the non-null safe versions of Dart.
As with the timing issue it all depends on the PubNub network - all actions are asynchronous so you cannot guarantee the correct order of subscribing and publishing because of many variables like network latency, PoP processing, network congestion and so on.
@are : As i see that commits, timetoken added as fix for this as with other client sdk has same. and you directly migrated it to nullsafety without releasing its stable version which is currently working. Right now its creating issue with other dependencies also. if you can do that then it will realy helpful to me.
Steps to replicate :
Here are the logs of flutter side.
Punub console screenshot
https://pasteboard.co/KaaWttL.png
pubnub lib version :
3.2.0
Following is pseudo code
/// pubnub config
Step 1 :
var _subscription = await _pubnub.subscribe(channels: {'channelA'}, withPresence: true);
Step2 : send message from pubnub console to channelB
Step 3: subscribe to channelB
Let me know if anything missed or any changes require for this.