pulsar-client-go
pulsar-client-go copied to clipboard
Enable seeking individual topic partitions
Currently, seeking on a consumer with a KeyShared subscription fails. This PR removes an unnecessary check to seek the underlying partitionConsumer.
@codelipenghui I've added tests.
If you want to directly perform the seek operation on a partitioned topic, you can refer to the behavior here. https://github.com/apache/pulsar-client-go/pull/782
@severinson After checking more details about this part. Before 2.8.0, the Java client only supported seek with the earliest/latest position. https://github.com/apache/pulsar/pull/10033 has introduced a new API https://github.com/apache/pulsar/pull/10033/files#diff-6010f94fead60a5a3ed8aa58a37fe96fdf2cd9c5c1573989cdf89abcb9f9c256R613 which able to provide seek message ID for each partition or topic(For multi-topic/regex consumer)
I think the go client should also follow the same way.