mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
enhance: Explicitly set StartMessageIDInclusive to true for pulsar consumer (#46591)
In pulsar-client-go v0.12, `Consumer.Seek()` **includes** the message at the seek position by default. However, in v0.17+, the default behavior changed to **exclude** the seek position message. This commit explicitly sets `StartMessageIDInclusive=true` when creating pulsar consumers to ensure consistent seek behavior and prevent potential message loss after upgrading the Pulsar client library. issue: https://github.com/milvus-io/milvus/issues/46589 pr: https://github.com/milvus-io/milvus/pull/46501 Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
parent
ddf19de7f7
commit
1bc7932875
@ -119,6 +119,7 @@ func (pc *pulsarClient) Subscribe(ctx context.Context, options mqwrapper.Consume
|
||||
Type: pulsar.Exclusive,
|
||||
SubscriptionInitialPosition: pulsar.SubscriptionInitialPosition(options.SubscriptionInitialPosition),
|
||||
MessageChannel: receiveChannel,
|
||||
StartMessageIDInclusive: true,
|
||||
})
|
||||
if err != nil {
|
||||
metrics.MsgStreamOpCounter.WithLabelValues(metrics.CreateConsumerLabel, metrics.FailLabel).Inc()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user