Interface ReactiveMessagePipelineBuilder.OneByOneMessagePipelineBuilder<T>
- Type Parameters:
T
- the message payload type
- All Superinterfaces:
ReactiveMessagePipelineBuilder<T>
- All Known Subinterfaces:
ReactiveMessagePipelineBuilder.ConcurrentOneByOneMessagePipelineBuilder<T>
- Enclosing interface:
- ReactiveMessagePipelineBuilder<T>
public static interface ReactiveMessagePipelineBuilder.OneByOneMessagePipelineBuilder<T>
extends ReactiveMessagePipelineBuilder<T>
Builder interface for a pipeline that handles messages one-by-one.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.pulsar.reactive.client.api.ReactiveMessagePipelineBuilder
ReactiveMessagePipelineBuilder.ConcurrentOneByOneMessagePipelineBuilder<T>, ReactiveMessagePipelineBuilder.OneByOneMessagePipelineBuilder<T>
-
Method Summary
Modifier and TypeMethodDescriptionconcurrency
(int concurrency) Sets the concurrency for the pipeline.errorLogger
(BiConsumer<org.apache.pulsar.client.api.Message<T>, Throwable> errorLogger) Sets a function which will be called when the message handler emits an error.handlingTimeout
(Duration handlingTimeout) Sets the timeout for the message handler function.Methods inherited from interface org.apache.pulsar.reactive.client.api.ReactiveMessagePipelineBuilder
build, messageHandler, pipelineRetrySpec, streamingMessageHandler, transformPipeline
-
Method Details
-
handlingTimeout
ReactiveMessagePipelineBuilder.OneByOneMessagePipelineBuilder<T> handlingTimeout(Duration handlingTimeout) Sets the timeout for the message handler function. Defaults to 2 minutes.- Parameters:
handlingTimeout
- the handling timeout value- Returns:
- the pipeline builder instance
- See Also:
-
errorLogger
ReactiveMessagePipelineBuilder.OneByOneMessagePipelineBuilder<T> errorLogger(BiConsumer<org.apache.pulsar.client.api.Message<T>, Throwable> errorLogger) Sets a function which will be called when the message handler emits an error.- Parameters:
errorLogger
- the error logger function- Returns:
- the pipeline builder instance
-
concurrency
ReactiveMessagePipelineBuilder.ConcurrentOneByOneMessagePipelineBuilder<T> concurrency(int concurrency) Sets the concurrency for the pipeline. The messages will be dispatched to concurrent instances of the message handler.- Parameters:
concurrency
- the number of concurrent message handlers- Returns:
- a concurrent pipeline builder instance
-