xige-16 opened a new issue #593:
URL: https://github.com/apache/pulsar-client-go/issues/593
#### Expected behavior
consume success after seekByTime
#### Actual behavior
After running the for loop a few times, step msg := <-consumer.Chan() will
be blocked.
#### Steps to reproduce
```go
func TestPulsarChannel2(t *testing.T) {
Params.Init()
c, err := pulsar.NewClient(pulsar.ClientOptions{URL:
Params.PulsarAddress})
assert.Nil(t, err)
for i := 0; i < 100; i++ {
channel := strconv.Itoa(rand.Int())
p, err := c.CreateProducer(pulsar.ProducerOptions{Topic:
channel})
assert.Nil(t, err)
ppm := &pulsar.ProducerMessage{Payload: []byte{1}, Properties:
map[string]string{}}
_, err = p.Send(context.TODO(), ppm)
assert.Nil(t, err)
p.Close()
consumer, err := c.Subscribe(pulsar.ConsumerOptions{
Topic: channel,
SubscriptionName: "test",
Type: pulsar.KeyShared,
SubscriptionInitialPosition:
pulsar.SubscriptionPositionEarliest,
})
assert.Nil(t, err)
consumer.SeekByTime(time.Unix(0, 0))
msg := <-consumer.Chan()
assert.EqualValues(t, []byte{1}, msg.Payload)
consumer.Close()
}
}
```
#### System configuration
**Pulsar version**: x.y
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]