apache / apache/pulsar-client-go

AckID block calling goroutine

Open
#770 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
745
Forks
389
Avg merge
3d 20h
Merged PRs (30d)
3

Description

#### Expected behavior

partitionConsumer.AckID should not block calling goroutine.

#### Actual behavior

block calling goroutine infinite
![image](https://user-images.githubusercontent.com/720496/166132070-3645dff4-0f1e-48f4-8e6c-03b956f6471f.png)

#### Steps to reproduce

call Consumer AckID(MessageID) method.

```
func (pc *partitionConsumer) AckID(msgID trackingMessageID) {
if !msgID.Undefined() && msgID.ack() {
pc.metrics.AcksCounter.Inc()
pc.metrics.ProcessingTime.Observe(float64(time.Now().UnixNano()-msgID.receivedTime.UnixNano()) / 1.0e9)
req := &ackRequest{
msgID: msgID,
}

pc.eventsCh <- req // blocked in this line !!!

pc.options.interceptors.OnAcknowledge(pc.parentConsumer, msgID)
}
}
```

#### System configuration
**Pulsar version**: x.y

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.