Class DefaultPulsarMessageReceipt
- java.lang.Object
-
- org.apache.camel.component.pulsar.DefaultPulsarMessageReceipt
-
- All Implemented Interfaces:
PulsarMessageReceipt
public class DefaultPulsarMessageReceipt extends Object implements PulsarMessageReceipt
-
-
Constructor Summary
Constructors Constructor Description DefaultPulsarMessageReceipt(org.apache.pulsar.client.api.Consumer consumer, org.apache.pulsar.client.api.MessageId messageId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacknowledge()Acknowledge receipt of this message synchronously.CompletableFuture<Void>acknowledgeAsync()Acknowledge receipt of this message asynchronously.voidacknowledgeCumulative()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.ConsumergetConsumer()org.apache.pulsar.client.api.MessageIdgetMessageId()voidnegativeAcknowledge()Acknowledge the failure to process this message.
-
-
-
Method Detail
-
acknowledge
public void acknowledge() throws org.apache.pulsar.client.api.PulsarClientExceptionDescription copied from interface:PulsarMessageReceiptAcknowledge receipt of this message synchronously.- Specified by:
acknowledgein interfacePulsarMessageReceipt- Throws:
org.apache.pulsar.client.api.PulsarClientException- See Also:
Consumer.acknowledge(MessageId)
-
acknowledgeCumulative
public void acknowledgeCumulative() throws org.apache.pulsar.client.api.PulsarClientExceptionDescription copied from interface:PulsarMessageReceiptAcknowledge receipt of all of the messages in the stream up to and including this message synchronously.- Specified by:
acknowledgeCumulativein interfacePulsarMessageReceipt- Throws:
org.apache.pulsar.client.api.PulsarClientException- See Also:
Consumer.acknowledgeCumulative(MessageId)
-
acknowledgeAsync
public CompletableFuture<Void> acknowledgeAsync()
Description copied from interface:PulsarMessageReceiptAcknowledge receipt of this message asynchronously.- Specified by:
acknowledgeAsyncin interfacePulsarMessageReceipt- See Also:
Consumer.acknowledgeAsync(MessageId)
-
acknowledgeCumulativeAsync
public CompletableFuture<Void> acknowledgeCumulativeAsync()
Description copied from interface:PulsarMessageReceiptAcknowledge receipt of all of the messages in the stream up to and including this message asynchronously.- Specified by:
acknowledgeCumulativeAsyncin interfacePulsarMessageReceipt- See Also:
Consumer.acknowledgeCumulativeAsync(MessageId)
-
negativeAcknowledge
public void negativeAcknowledge()
Description copied from interface:PulsarMessageReceiptAcknowledge the failure to process this message.- Specified by:
negativeAcknowledgein interfacePulsarMessageReceipt- See Also:
Note: Available in Puslar 2.4.0. Implementations with earlier versions should return an .
-
getConsumer
public org.apache.pulsar.client.api.Consumer getConsumer()
-
getMessageId
public org.apache.pulsar.client.api.MessageId getMessageId()
-
-