Interface ReactiveMessagePipelineBuilder<T>

    • Method Detail

      • messageHandler

        ReactiveMessagePipelineBuilder.OneByOneMessagePipelineBuilder<T> messageHandler​(java.util.function.Function<org.apache.pulsar.client.api.Message<T>,​org.reactivestreams.Publisher<java.lang.Void>> messageHandler)
        Sets a handler function that processes messages one-by-one.
        Parameters:
        messageHandler - a function that takes a message as input and returns an empty Publisher
        Returns:
        a builder for the pipeline handling messages one-by-one
      • streamingMessageHandler

        ReactiveMessagePipelineBuilder<T> streamingMessageHandler​(java.util.function.Function<reactor.core.publisher.Flux<org.apache.pulsar.client.api.Message<T>>,​org.reactivestreams.Publisher<MessageResult<java.lang.Void>>> streamingMessageHandler)
        Sets a handler function that processes the stream of messages.
        Parameters:
        streamingMessageHandler - a function that takes a stream of messages as input and returns a MessageResult that contains the acknowledgement or negative acknowledgement value of the processing.
        Returns:
        the pipeline builder instance
      • transformPipeline

        ReactiveMessagePipelineBuilder<T> transformPipeline​(java.util.function.Function<reactor.core.publisher.Mono<java.lang.Void>,​org.reactivestreams.Publisher<java.lang.Void>> transformer)
        Sets a transform function that can be used to customize the pipeline.
        Parameters:
        transformer - a transform function
        Returns:
        the pipeline builder instance
        See Also:
        Mono.transform(Function)
      • pipelineRetrySpec

        ReactiveMessagePipelineBuilder<T> pipelineRetrySpec​(reactor.util.retry.Retry pipelineRetrySpec)
        Sets a retry spec that will be used in case of failures in the pipeline. The default is to retry indefinitely with an exponential backoff.
        Parameters:
        pipelineRetrySpec - the retry spec
        Returns:
        the pipeline builder instance
        See Also:
        Mono.retryWhen(Retry)