You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/11/21 08:44:21 UTC

[GitHub] [pulsar] crossoverJie added a comment to the discussion: Is it possible to manually acknowledge messages via msgId?

GitHub user crossoverJie added a comment to the discussion: Is it possible to manually acknowledge messages via msgId?

Thanks for the answer, Before this I thought that `individuallyDeletedMessages` stored unacknowledged messages.

---
Here is my testing process:

```java
"individuallyDeletedMessages": "[(414:36..414:39]]",
consumer.acknowledge(new MessageIdImpl(414, 35, 1));
consumer.acknowledge(new MessageIdImpl(414, 36, 1));
```
Query `individuallyDeletedMessages` again:
`"individuallyDeletedMessages": "[(414:36..414:39]]",`
The results did not change.

When I restart the consumer:
```java
consumer Message received: 414:35:1:0
consumer Message received: 414:36:1:0
```
The message that was just manually confirmed is still available, At the same time:
`"individuallyDeletedMessages": "[]"`

My expected results should be:
After I manually acknowledge the message, the restart consumer does not get the message again and at the same time, individuallyDeletedMessages should change.

Is my understanding correct?

thx.

GitHub link: https://github.com/apache/pulsar/discussions/18544#discussioncomment-4193283

----
This is an automatically sent email for dev@pulsar.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@pulsar.apache.org