Skip to content
This repository was archived by the owner on Apr 1, 2024. It is now read-only.
This repository was archived by the owner on Apr 1, 2024. It is now read-only.

ISSUE-9028: [C++] PartitionedConsumerImpl send redeliverMessages repeatedly  #1925

@sijie

Description

@sijie

Original Issue: apache#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 apache#8606 (comment)

To Reproduce

  1. 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);
  1. recevie a msg from partitioned topic and not do acknowledge
Message msg;
consumer.recevie(msg)
sleep(20000);
  1. sleep 20000ms to trigger redeliverMessages repeatedly
sleep(20000);

Expected behavior
Only one redeliverUnacknowledgedMessages should be sent in PartitionedConsumerImpl

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions