Class ReactiveStreamsEndpoint
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.component.reactive.streams.ReactiveStreamsEndpoint
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.ComponentAware,org.apache.camel.Endpoint,org.apache.camel.IsSingleton,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasCamelContext,org.apache.camel.spi.HasId,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="2.19.0",
scheme="reactive-streams",
title="Reactive Streams",
syntax="reactive-streams:stream",
remote=false,
category=MESSAGING,
headersClass=ReactiveStreamsConstants.class)
@ManagedResource(description="Managed ReactiveStreamsEndpoint")
public class ReactiveStreamsEndpoint
extends org.apache.camel.support.DefaultEndpoint
Exchange messages with reactive stream processing libraries compatible with the reactive streams standard.
-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsConstructorDescriptionReactiveStreamsEndpoint(String endpointUri, ReactiveStreamsComponent component) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor) org.apache.camel.ProducerintdoublebooleanbooleanbooleanisRemote()voidsetBackpressureStrategy(ReactiveStreamsBackpressureStrategy backpressureStrategy) The backpressure strategy to use when pushing events to a slow subscriber.voidsetConcurrentConsumers(int concurrentConsumers) Number of threads used to process exchanges in the Camel route.voidsetExchangesRefillLowWatermark(double exchangesRefillLowWatermark) Set the low watermark of requested exchanges to the active subscription as percentage of the maxInflightExchanges.voidsetForwardOnComplete(boolean forwardOnComplete) Determines if onComplete events should be pushed to the Camel route.voidsetForwardOnError(boolean forwardOnError) Determines if onError events should be pushed to the Camel route.voidsetMaxInflightExchanges(Integer maxInflightExchanges) Maximum number of exchanges concurrently being processed by Camel.voidName of the stream channel used by the endpoint to exchange messages.Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toStringMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.ComponentAware
getComponentMethods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isSingletonProducerMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
ReactiveStreamsEndpoint
-
-
Method Details
-
isRemote
public boolean isRemote() -
createProducer
- Throws:
Exception
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception - Throws:
Exception
-
getStream
@ManagedAttribute(description="Name of the stream channel used by the endpoint to exchange messages") public String getStream() -
setStream
Name of the stream channel used by the endpoint to exchange messages. -
getMaxInflightExchanges
@ManagedAttribute(description="Maximum number of exchanges concurrently being processed by Camel") public Integer getMaxInflightExchanges() -
setMaxInflightExchanges
Maximum number of exchanges concurrently being processed by Camel. This parameter controls backpressure on the stream. Setting a non-positive value will disable backpressure. -
getConcurrentConsumers
public int getConcurrentConsumers() -
setConcurrentConsumers
@ManagedAttribute(description="Number of threads used to process exchanges in the Camel route") public void setConcurrentConsumers(int concurrentConsumers) Number of threads used to process exchanges in the Camel route. -
getBackpressureStrategy
-
setBackpressureStrategy
The backpressure strategy to use when pushing events to a slow subscriber. -
isForwardOnComplete
@ManagedAttribute(description="Determines if onComplete events should be pushed to the Camel route") public boolean isForwardOnComplete() -
setForwardOnComplete
public void setForwardOnComplete(boolean forwardOnComplete) Determines if onComplete events should be pushed to the Camel route. -
isForwardOnError
@ManagedAttribute(description="Determines if onError events should be pushed to the Camel route") public boolean isForwardOnError() -
setForwardOnError
public void setForwardOnError(boolean forwardOnError) Determines if onError events should be pushed to the Camel route. Exceptions will be set as message body. -
getExchangesRefillLowWatermark
@ManagedAttribute(description="The percentage of maxInflightExchanges below which new items can be requested to the source subscription") public double getExchangesRefillLowWatermark() -
setExchangesRefillLowWatermark
public void setExchangesRefillLowWatermark(double exchangesRefillLowWatermark) Set the low watermark of requested exchanges to the active subscription as percentage of the maxInflightExchanges. When the number of pending items from the upstream source is lower than the watermark, new items can be requested to the subscription. If set to 0, the subscriber will request items in batches of maxInflightExchanges, only after all items of the previous batch have been processed. If set to 1, the subscriber can request a new item each time an exchange is processed (chatty). Any intermediate value can be used.
-