We are running into issues with messages duplicate...
# general
t
We are running into issues with messages duplicates. So far what I've witnessed is happening with the RLQ messages, not sure for first time messages yet. Sometimes we have multiple messages for all the retry counts (2 ones, 2 twos...) or just for some. It's also not consistent, I do see some clean retries with first message, then retries from 1 to 10 (RLQ), then sent to DLQ. In case of a failing message what we do is • first use the client consumer
ReconsumerLaterWithCustomProperties()
to send to RLQ (different topic) •
Nack()
the retries • Send the message to the DLQ, still using
Nack()
built-in consumer method The issue is very inconsistent (we don't have a lot of errors in the system), but I noticed a few instances so far. One had
25
retries (instead of
10
) Investigation: • I looked at the broker config, was aware there is a limit of producer count for the dedup, but we are well under 10,000 per broker.
Copy code
pulsar-broker-3:/pulsar$ cat conf/broker.conf | grep brokerDedup
brokerDeduplicationEnabled=true
brokerDeduplicationMaxNumberOfProducers=10000
brokerDeduplicationSnapshotFrequencyInSeconds=120
# It will run simultaneously with `brokerDeduplicationEntriesInterval`
brokerDeduplicationSnapshotIntervalSeconds=120
brokerDeduplicationEntriesInterval=1000
brokerDeduplicationProducerInactivityTimeoutMinutes=360
So my question is: is there anything that lead to RLQ messages duplicates in the system? I looked at our implementation and don't see anything suspicious so far but wanted to ask in case it's a know issue or if there something I should look into specifically. Pulsar
4.0.5
/ Go client
0.16.0
but issue was also present in prior version Thank you
✅ 1
I'm wondering if it could be related to batch index acknowledgment not enabled by default https://pulsar.apache.org/docs/4.0.x/txn-advanced-features/#ack-batch-messages Our brokers conf
Copy code
pulsar-broker-5:/pulsar$ cat conf/broker.conf | grep acknowledgmentAtBatchIndexLevelEnabled -B1
# Whether to enable acknowledge of batch local index.
acknowledgmentAtBatchIndexLevelEnabled=false
Our client (we don't have it enabled) https://github.com/apache/pulsar-client-go/blob/master/pulsar/consumer.go#L248-L250
I also have concerns about this part where the negativeAckTracker does not carry the batchIndex when preparing the batchMsgID for redeliveries. It's mentioned it tracks the batch, but with if the consumer has
EnableBatchIndexAcknowledgment
enabled, should the batch index set as well? https://github.com/apache/pulsar-client-go/blob/master/pulsar/negative_acks_tracker.go#L74
I'm still able to reproduce the issue with Pulsar
4.0.6
and the last commit from master in the Go client, as well as
acknowledgmentAtBatchIndexLevelEnabled
set to true. I'll keep investigating in case I find anything related to Pulsar or the client
I have noticed the redelivery count is not persistent, and is reset when a broker restarts. Is there an alternative to it? The only option I have in mind is avoid using the built-it nack mechanism and ack/republish with message custom properties with the accurate count, but that's not ideal
I'm ended up using
ReconsumeLaterWithCustomProperties()
so that messages get republished to the RLQ/DLQ and used the core property
RECONSUMETIMES
updated on the message as the delivery count value (persistent basically)