-
-
Notifications
You must be signed in to change notification settings - Fork 609
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
[feature] Access to channel offset and epoch #446
Comments
Done in v3, introduction blog post. Offset and epoch now returned in publish result if channel stream has history enabled. @gazugafan, centrifuge-js 2.8.0 also contains a way to access StreamPosition in One thing to mention is that our existing HTTP API client libraries not all updated yet to support publish result with additional fields. But since it's a simple HTTP POST request - should not be a blocker I believe. Also possible to use GRPC server API and generate code for publisher side. |
Amazing! Excited to try out v3 soon. Will report back when I do :D |
Closing, feel free to continue writing here in case of any feedback. |
From the discussion here: centrifugal/centrifuge-js#44 (comment)
It would be nice to be able to get a channel's
offset
andepoch
--especially after publishing a message. Ideally, I'd like the publish command to respond with the newly published message's offset and epoch--similar to how NCHAN works. Or perhaps there could be a new command to retrieve a channel's current offset and epoch?This would help solve the problem where, after loading the application state during the initial page request, messages are published (and missed) in the few seconds before the client can establish a subscription connection.
Instead, we could send the current
offset
andepoch
along with the current application state during the initial page request, and then include this offset and epoch when the client subscribes.It would be extra nice if the centrifuge-js (and other) client libraries could accept an
offset
andepoch
right in theirsubscribe
methods--automatically retrieving and playing back any messages missed afterwards. I think the existinghistory
method is probably enough to accomplish this already, but that would require a little extra work and I'd be worried the timing might not be quite perfect.The text was updated successfully, but these errors were encountered: