szkoludasebastian commented on issue #12059: URL: https://github.com/apache/pulsar/issues/12059#issuecomment-1661961199
Have same issue. Previously we were using Pulsar Client with version 2.7.1. After updating it to 3.0.0 it stopped acknowledging messages. We have tried all versions after 2.7.1 till 3.0.0. So the environment in which issue exists: Java 17 Pulsar: 3.0.0 Pulsar Client: 3.0.0 Below I attached simple project in which I reproduced this issue: [pulsar-message-ack-issue.zip](https://github.com/apache/pulsar/files/12239006/pulsar-message-ack-issue.zip) It contains two simple apps: one is responsible for sending messages to topic test-topic-read (it is placed in file Main2.java) second one is responsible for reading those messages from topic test-topic-read, sending them to topic test-topic-write and at the end acknowledging messages on test-topic-read (it is placed in file Main.java). It acknowledges messages with this code: ``` @SneakyThrows private CompletableFuture<Void> acceptMessage(Message<byte[]> msg) { MessageId msgId = MessageId.fromByteArray(msg.getMessageId().toByteArray()); return consumer.acknowledgeAsync(msgId); // return consumer.acknowledgeAsync(msg.getMessageId()); } ``` First line is causing the problem that messages are not acknowledged. When I will comment two first lines and uncomment the third line then everything works correctly. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
