You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2023/01/18 06:13:59 UTC

[GitHub] [pulsar] mattisonchao opened a new issue, #19268: [Bug] Acknowledge the same message-id causes inconsistency unackedMessages number.

mattisonchao opened a new issue, #19268:
URL: https://github.com/apache/pulsar/issues/19268

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
   
   
   ### Version
   
   all
   
   ### Minimal reproduce step
   
   ```java
   /**
        * This test is used to test the unackedMessage number in the consumer.
        */
       @Test
       public void testDuplicateAcknowledgement() throws PulsarClientException, PulsarAdminException {
           final String topicName = "persistent://public/default/duplicated-acknowledgement-test";
           @Cleanup
           Producer<byte[]> producer = pulsarClient.newProducer()
                   .topic(topicName)
                   .create();
           @Cleanup
           Consumer<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);
       }
   ```
   
   ### What did you expect to see?
   
   `unackedMessages=0`.
   
   ### What did you see instead?
   
   `unackedMessages=-1`.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


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

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] Technoboy- closed issue #19268: [Bug] Acknowledge the same message-id causes inconsistency unackedMessages number.

Posted by "Technoboy- (via GitHub)" <gi...@apache.org>.
Technoboy- closed issue #19268: [Bug] Acknowledge the same message-id causes inconsistency unackedMessages number.
URL: https://github.com/apache/pulsar/issues/19268


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

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] labuladong commented on issue #19268: [Bug] Acknowledge the same message-id causes inconsistency unackedMessages number.

Posted by "labuladong (via GitHub)" <gi...@apache.org>.
labuladong commented on issue #19268:
URL: https://github.com/apache/pulsar/issues/19268#issuecomment-1407338621

   Assign to me please


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

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on issue #19268: [Bug] Acknowledge the same message-id causes inconsistency unackedMessages number.

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19268:
URL: https://github.com/apache/pulsar/issues/19268#issuecomment-1447454069

   The issue had no activity for 30 days, mark with Stale label.


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

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org