saosir opened a new issue #9028:
URL: https://github.com/apache/pulsar/issues/9028


   **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 
   
   **To Reproduce**
   1. subscribe a partitioned topic and set UnAckedMessagesTimeoutMs
   
   ```cpp
   Consumer consumer;
   ConsumerConfiguration consumerConf;
   consumerConf.setUnAckedMessagesTimeoutMs(11000);  // must >= 10000
   consumerConf.setTickDurationInMs(11000);
   Result result = client.subscribe("my-topic", "consumer-1", consumerConf, 
consumer);
   ```
   
   2. recevie a msg from partitioned topic and not do acknowledge
   ```cpp
   Message msg;
   consumer.recevie(msg)
   sleep(20000);
   ```
   3. sleep 20000ms to trigger `redeliverMessages` repeatedly 
   ```cpp
   sleep(20000);
   ```
   
   **Expected behavior**
   Only one `redeliverUnacknowledgedMessages` should be sent in 
`PartitionedConsumerImpl`
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to