Class ApiImplementationFactory

java.lang.Object
org.apache.pulsar.reactive.client.internal.api.ApiImplementationFactory

public final class ApiImplementationFactory extends Object
Internal API implementation.
  • Method Details

    • acknowledge

      public static <T> MessageResult<T> acknowledge(org.apache.pulsar.client.api.MessageId messageId, T value)
      Returns the processed value and signals that the message must be acknowledged.
      Type Parameters:
      T - the type of the processed value
      Parameters:
      messageId - the id of the message to acknowledge
      value - the processed value
      Returns:
      the result of the message processing
    • negativeAcknowledge

      public static <T> MessageResult<T> negativeAcknowledge(org.apache.pulsar.client.api.MessageId messageId, T value)
      Returns the processed value and signals that the message must be negatively acknowledged.
      Type Parameters:
      T - the type of the processed value
      Parameters:
      messageId - the id of the message to negatively acknowledge
      value - the processed value
      Returns:
      the result of the message processing
    • acknowledge

      public static MessageResult<Void> acknowledge(org.apache.pulsar.client.api.MessageId messageId)
      Returns an empty value and signals that the message must be acknowledged.
      Parameters:
      messageId - the id of the message to acknowledge
      Returns:
      the result of the message processing
    • negativeAcknowledge

      public static MessageResult<Void> negativeAcknowledge(org.apache.pulsar.client.api.MessageId messageId)
      Returns an empty value and signals that the message must be negatively acknowledged.
      Parameters:
      messageId - the id of the message to negatively acknowledge
      Returns:
      the result of the message processing
    • createMessageSpecBuilder

      public static <T> MessageSpecBuilder<T> createMessageSpecBuilder(T value)
      Creates a message spec builder from a value.
      Type Parameters:
      T - the message payload type
      Parameters:
      value - the value to create the message spec builder from
      Returns:
      the message spec builder
    • createValueOnlyMessageSpec

      public static <T> MessageSpec<T> createValueOnlyMessageSpec(T value)
      Creates a message spec from a value.
      Type Parameters:
      T - the message payload type
      Parameters:
      value - the value to create the message spec from
      Returns:
      the message spec
    • createReactiveMessageHandlerPipelineBuilder

      public static <T> ReactiveMessagePipelineBuilder<T> createReactiveMessageHandlerPipelineBuilder(ReactiveMessageConsumer<T> messageConsumer)
      Creates a builder for building a ReactiveMessagePipeline.
      Type Parameters:
      T - the message payload type
      Parameters:
      messageConsumer - reactive consumer used by the pipeline
      Returns:
      a builder for building a ReactiveMessagePipeline