public class DefaultPulsarMessageReceipt extends Object implements PulsarMessageReceipt
Constructor and Description |
---|
DefaultPulsarMessageReceipt(org.apache.pulsar.client.api.Consumer consumer,
org.apache.pulsar.client.api.MessageId messageId) |
Modifier and Type | Method and Description |
---|---|
void |
acknowledge()
Acknowledge receipt of this message synchronously.
|
CompletableFuture<Void> |
acknowledgeAsync()
Acknowledge receipt of this message asynchronously.
|
void |
acknowledgeCumulative()
Acknowledge receipt of all of the messages in the stream up to and including this message synchronously.
|
CompletableFuture<Void> |
acknowledgeCumulativeAsync()
Acknowledge receipt of all of the messages in the stream up to and including this message asynchronously.
|
org.apache.pulsar.client.api.Consumer |
getConsumer() |
org.apache.pulsar.client.api.MessageId |
getMessageId() |
void |
negativeAcknowledge()
Acknowledge the failure to process this message.
|
public DefaultPulsarMessageReceipt(org.apache.pulsar.client.api.Consumer consumer, org.apache.pulsar.client.api.MessageId messageId)
public void acknowledge() throws org.apache.pulsar.client.api.PulsarClientException
PulsarMessageReceipt
acknowledge
in interface PulsarMessageReceipt
org.apache.pulsar.client.api.PulsarClientException
Consumer.acknowledge(MessageId)
public void acknowledgeCumulative() throws org.apache.pulsar.client.api.PulsarClientException
PulsarMessageReceipt
acknowledgeCumulative
in interface PulsarMessageReceipt
org.apache.pulsar.client.api.PulsarClientException
Consumer.acknowledgeCumulative(MessageId)
public CompletableFuture<Void> acknowledgeAsync()
PulsarMessageReceipt
acknowledgeAsync
in interface PulsarMessageReceipt
Consumer.acknowledgeAsync(MessageId)
public CompletableFuture<Void> acknowledgeCumulativeAsync()
PulsarMessageReceipt
acknowledgeCumulativeAsync
in interface PulsarMessageReceipt
Consumer.acknowledgeCumulativeAsync(MessageId)
public void negativeAcknowledge()
PulsarMessageReceipt
negativeAcknowledge
in interface PulsarMessageReceipt
Note: Available in Puslar 2.4.0. Implementations with earlier versions should return an {@link java.lang.UnsupportedOperationException}.
public org.apache.pulsar.client.api.Consumer getConsumer()
public org.apache.pulsar.client.api.MessageId getMessageId()
Apache Camel