You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Acknowledge the same message-id causes inconsistency unackedMessages number. #19268
I searched in the issues and found nothing similar.
Version
all
Minimal reproduce step
/** * This test is used to test the unackedMessage number in the consumer. */@TestpublicvoidtestDuplicateAcknowledgement() throwsPulsarClientException, PulsarAdminException {
finalStringtopicName = "persistent://public/default/duplicated-acknowledgement-test";
@CleanupProducer<byte[]> producer = pulsarClient.newProducer()
.topic(topicName)
.create();
@CleanupConsumer<byte[]> consumer1 = pulsarClient.newConsumer()
.topic(topicName)
.subscriptionName("sub-1")
.acknowledgmentGroupTime(0, TimeUnit.SECONDS)
.subscriptionType(SubscriptionType.Shared)
.subscribe();
producer.send("1".getBytes(StandardCharsets.UTF_8));
Message<byte[]> message = consumer1.receive();
consumer1.acknowledge(message);
consumer1.acknowledge(message);
assertEquals(admin.topics().getStats(topicName).getSubscriptions()
.get("sub-1").getUnackedMessages(), 0);
}
Activity
labuladong commentedon Jan 28, 2023
Assign to me please
github-actions commentedon Feb 28, 2023
The issue had no activity for 30 days, mark with Stale label.