Description
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