Class ApiImplementationFactory
java.lang.Object
org.apache.pulsar.reactive.client.internal.api.ApiImplementationFactory
Internal API implementation.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MessageResult<Void>acknowledge(org.apache.pulsar.client.api.MessageId messageId) Returns an empty value and signals that the message must be acknowledged.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.static <T> MessageSpecBuilder<T>createMessageSpecBuilder(T value) Creates a message spec builder from a value.static <T> ReactiveMessagePipelineBuilder<T>createReactiveMessageHandlerPipelineBuilder(ReactiveMessageConsumer<T> messageConsumer) Creates a builder for building aReactiveMessagePipeline.static <T> MessageSpec<T>createValueOnlyMessageSpec(T value) Creates a message spec from a value.static MessageResult<Void>negativeAcknowledge(org.apache.pulsar.client.api.MessageId messageId) Returns an empty value and signals that the message must be negatively acknowledged.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.
-
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 acknowledgevalue- 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 acknowledgevalue- the processed value- Returns:
- the result of the message processing
-
acknowledge
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
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
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 aReactiveMessagePipeline.- Type Parameters:
T- the message payload type- Parameters:
messageConsumer- reactive consumer used by the pipeline- Returns:
- a builder for building a
ReactiveMessagePipeline
-