Interface Acknowledgement
public interface Acknowledgement
Contract for manual acknowledgment.
When manual acknowledgment is used, applications can inject an Acknowledgment object in
the listener and then invoke manual acknowledgment.
- Author:
- Soby Chacko
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Manually acknowledges the current message that the listener is operating upon.void
acknowledge
(List<org.apache.pulsar.client.api.MessageId> messageIds) Manually acknowledges a list of messages based on their message id's.void
acknowledge
(org.apache.pulsar.client.api.MessageId messageId) Manually acknowledges by the message id.void
nack()
Negatively acknowledges the current message manually.void
nack
(org.apache.pulsar.client.api.MessageId messageId) Negative acknowledges the current message based on the message id.
-
Method Details
-
acknowledge
void acknowledge()Manually acknowledges the current message that the listener is operating upon. -
acknowledge
void acknowledge(org.apache.pulsar.client.api.MessageId messageId) Manually acknowledges by the message id.- Parameters:
messageId
- message id.
-
acknowledge
Manually acknowledges a list of messages based on their message id's.- Parameters:
messageIds
- collection of message id's.
-
nack
void nack()Negatively acknowledges the current message manually. -
nack
void nack(org.apache.pulsar.client.api.MessageId messageId) Negative acknowledges the current message based on the message id.- Parameters:
messageId
- message id.
-