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

Change consumer offset after creation #166

Open
Eyald6 opened this issue May 18, 2023 · 0 comments
Open

Change consumer offset after creation #166

Eyald6 opened this issue May 18, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Eyald6
Copy link

Eyald6 commented May 18, 2023

Is your feature request related to a problem? Please describe.

We sometime encounter a situation where a fresh consumer is created, without prior knowledge of the stream.
The consumer wants to search the stream to find a specific offset in which it should begin reading - for example find the exact offset which contains a message with a specific timestamp, given that the messages in stream are ordered.

To do this, we can simply perform a binary search across the stream to find our offset (again, given that the messages in the stream are ordered, which is the case). Unfortunately, we currently have to create a new consumer for each search probe.

I am mostly worried about performance hits due to this logic, but I am not aware of a way to go around it currently.

Describe the solution you'd like

I wonder, if it will be possible to simply send a new subscribe command or even better - simply change the offset of the current subscriber if it is even possible.

Describe alternatives you've considered

I didn't find any way to do so in other libraries (even amqp), and didn't find any documentation about a way to do it, so I'm not even sure if the server support such a feature.

Additional context

No response

@Eyald6 Eyald6 added the enhancement New feature or request label May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant