Describe the bug
Both PartitionedConsumerImpl and ConsumerImpl have member variable unAckedMessageTrackerPtr_ (class UnAckedMessageTrackerEnabled), and PartitionedConsumerImpl is composed of ConsumerImpl. If the acknowledgement times out, they will send redeliverMessages repeatedly, MultiTopicsConsumerImpl has same problem.
see #8606 (comment)
To Reproduce
- subscribe a partitioned topic and set UnAckedMessagesTimeoutMs
Consumer consumer;
ConsumerConfiguration consumerConf;
consumerConf.setUnAckedMessagesTimeoutMs(11000); // must >= 10000
consumerConf.setTickDurationInMs(11000);
Result result = client.subscribe("my-topic", "consumer-1", consumerConf, consumer);
- recevie a msg from partitioned topic and not do acknowledge
Message msg;
consumer.recevie(msg)
sleep(20000);
- sleep 20000ms to trigger
redeliverMessages repeatedly
Expected behavior
Only one redeliverUnacknowledgedMessages should be sent in PartitionedConsumerImpl
Describe the bug
Both
PartitionedConsumerImplandConsumerImplhave member variableunAckedMessageTrackerPtr_(class UnAckedMessageTrackerEnabled), andPartitionedConsumerImplis composed ofConsumerImpl. If the acknowledgement times out, they will send redeliverMessages repeatedly,MultiTopicsConsumerImplhas same problem.see #8606 (comment)
To Reproduce
redeliverMessagesrepeatedlyExpected behavior
Only one
redeliverUnacknowledgedMessagesshould be sent inPartitionedConsumerImpl