Class DefaultPulsarMessageReceipt

java.lang.Object
org.apache.camel.component.pulsar.DefaultPulsarMessageReceipt
All Implemented Interfaces:
PulsarMessageReceipt

public class DefaultPulsarMessageReceipt extends Object implements PulsarMessageReceipt
  • Constructor Details

    • DefaultPulsarMessageReceipt

      public DefaultPulsarMessageReceipt(org.apache.pulsar.client.api.Consumer consumer, org.apache.pulsar.client.api.MessageId messageId)
  • Method Details

    • acknowledge

      public void acknowledge() throws org.apache.pulsar.client.api.PulsarClientException
      Description copied from interface: PulsarMessageReceipt
      Acknowledge receipt of this message synchronously.
      Specified by:
      acknowledge in interface PulsarMessageReceipt
      Throws:
      org.apache.pulsar.client.api.PulsarClientException
      See Also:
      • Consumer.acknowledge(MessageId)
    • acknowledgeCumulative

      public void acknowledgeCumulative() throws org.apache.pulsar.client.api.PulsarClientException
      Description copied from interface: PulsarMessageReceipt
      Acknowledge receipt of all of the messages in the stream up to and including this message synchronously.
      Specified by:
      acknowledgeCumulative in interface PulsarMessageReceipt
      Throws:
      org.apache.pulsar.client.api.PulsarClientException
      See Also:
      • Consumer.acknowledgeCumulative(MessageId)
    • acknowledgeAsync

      public CompletableFuture<Void> acknowledgeAsync()
      Description copied from interface: PulsarMessageReceipt
      Acknowledge receipt of this message asynchronously.
      Specified by:
      acknowledgeAsync in interface PulsarMessageReceipt
      See Also:
      • Consumer.acknowledgeAsync(MessageId)
    • acknowledgeCumulativeAsync

      public CompletableFuture<Void> acknowledgeCumulativeAsync()
      Description copied from interface: PulsarMessageReceipt
      Acknowledge receipt of all of the messages in the stream up to and including this message asynchronously.
      Specified by:
      acknowledgeCumulativeAsync in interface PulsarMessageReceipt
      See Also:
      • Consumer.acknowledgeCumulativeAsync(MessageId)
    • negativeAcknowledge

      public void negativeAcknowledge()
      Description copied from interface: PulsarMessageReceipt
      Acknowledge the failure to process this message.
      Specified by:
      negativeAcknowledge in interface PulsarMessageReceipt
      See Also:
      • Note: Available in Puslar 2.4.0. Implementations with earlier versions should return an java.lang.UnsupportedOperationException.
    • getConsumer

      public org.apache.pulsar.client.api.Consumer getConsumer()
    • getMessageId

      public org.apache.pulsar.client.api.MessageId getMessageId()