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 in reverse chronological order #290

Open
cruickshankpg opened this issue Nov 27, 2020 · 1 comment
Open

Subscribe in reverse chronological order #290

cruickshankpg opened this issue Nov 27, 2020 · 1 comment

Comments

@cruickshankpg
Copy link

We have a use case to subscribe to a stream in reverse chronological order from an offset/timestamp. To achieve this on the consumer side we'd need to do lots of in memory caching or multiple requests so ideally Liftbridge could do it for us.

I would plan on it being exposed as a new reverse bool on the SubscribeRequest and a SubscriptionOption in the client library.

Also I think being able to get reverse order would help make cursor fetching more efficient:

func (c *cursorManager) getLatestCursorOffset(ctx context.Context, cursorKey []byte, partitionID int32) (int64, error) {

I'm happy to have a go at implementing this.

@tylertreat
Copy link
Member

Go for it. I thought the same thing when implementing cursor fetching.

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

No branches or pull requests

2 participants