unJASON opened a new issue, #1454:
URL: https://github.com/apache/pulsar-client-go/issues/1454
#### Expected behavior
No panic.
#### Actual behavior
``` go
panic: runtime error: index out of range [0] with length 0
goroutine 10127 [running]:
github.com/apache/pulsar-client-go/pulsar.(*partitionConsumer).dispatcher(0xc008556000)
D:/myGo/pkg/mod/github.com/apache/[email protected]/pulsar/consumer_partition.go:1721
+0xf94
created by github.com/apache/pulsar-client-go/pulsar.newPartitionConsumer in
goroutine 9173
D:/myGo/pkg/mod/github.com/apache/[email protected]/pulsar/consumer_partition.go:460
+0x161f
```
I think `MessageReceived` in `consumer_partition.go` may be the problem.
The for loop in `MessageReceived` may just `continue` instead of adding a
element in the `messages` in some situation.
we may add some codes before adding to `queueCh` at the end. of
`MessageReceived` like:
``` go
if (len(messages) == 0){
return nil
}
// send messages to the dispatcher
pc.queueCh <- messages
return nil
```
#### Steps to reproduce
How can we reproduce the issue
create 100 topic.
For each topic , create a producer and a consumer. Keep consuming messages.
While reset the cursor with timestamp infinitely.
#### System configuration
**Pulsar version**: 2.6.x
pulsar-client-go 0.17.0
--
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]