nodece commented on code in PR #1265:
URL: https://github.com/apache/pulsar-client-go/pull/1265#discussion_r1825850807
##########
pulsar/consumer_partition.go:
##########
@@ -1440,17 +1452,18 @@ func (pc *partitionConsumer) dispatcher() {
}
nextMessageSize = queueMsg.size()
- if pc.dlq.shouldSendToDlq(&nextMessage) {
- // pass the message to the DLQ router
- pc.metrics.DlqCounter.Inc()
- messageCh = pc.dlq.Chan()
- } else {
- // pass the message to application channel
- messageCh = pc.messageCh
+ if !pc.isSeeking.Load() {
Review Comment:
The channel is used to add or consume once. There is a loop, so we need to
use `atomic.Bool` instead `chan`.
--
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]