@UriEndpoint(firstVersion="2.16.0",
scheme="sjms-batch",
title="Simple JMS Batch",
syntax="sjms-batch:destinationName",
label="messaging",
consumerOnly=true)
public class SjmsBatchEndpoint
extends org.apache.camel.support.DefaultEndpoint
implements org.apache.camel.spi.HeaderFilterStrategyAware
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_COMPLETION_SIZE |
static int |
DEFAULT_COMPLETION_TIMEOUT |
Constructor and Description |
---|
SjmsBatchEndpoint() |
SjmsBatchEndpoint(String endpointUri,
org.apache.camel.Component component,
String remaining) |
Modifier and Type | Method and Description |
---|---|
protected JmsBinding |
createBinding()
Creates the
JmsBinding to use. |
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Exchange |
createExchange(javax.jms.Message message,
javax.jms.Session session) |
org.apache.camel.Producer |
createProducer() |
org.apache.camel.AggregationStrategy |
getAggregationStrategy() |
JmsBinding |
getBinding() |
int |
getCompletionInterval() |
org.apache.camel.Predicate |
getCompletionPredicate() |
int |
getCompletionSize() |
int |
getCompletionTimeout() |
SjmsBatchComponent |
getComponent() |
int |
getConsumerCount() |
String |
getDestinationName()
The destination name.
|
org.apache.camel.spi.HeaderFilterStrategy |
getHeaderFilterStrategy() |
JmsKeyFormatStrategy |
getJmsKeyFormatStrategy() |
int |
getKeepAliveDelay() |
MessageCreatedStrategy |
getMessageCreatedStrategy() |
int |
getPollDuration() |
int |
getRecoveryInterval() |
ScheduledExecutorService |
getTimeoutCheckerExecutorService() |
boolean |
isAllowNullBody() |
boolean |
isAsyncStartListener() |
boolean |
isEagerCheckCompletion() |
boolean |
isIncludeAllJMSXProperties() |
boolean |
isMapJmsMessage() |
boolean |
isSendEmptyMessageWhenIdle() |
void |
setAggregationStrategy(org.apache.camel.AggregationStrategy aggregationStrategy)
The aggregation strategy to use, which merges all the batched messages into a single message
|
void |
setAllowNullBody(boolean allowNullBody)
Whether to allow sending messages with no body.
|
void |
setAsyncStartListener(boolean asyncStartListener)
Whether to startup the consumer message listener asynchronously, when starting a route.
|
void |
setBinding(JmsBinding binding)
Sets the binding used to convert from a Camel message to and from a JMS
message
|
void |
setCompletionInterval(int completionInterval)
The completion interval in millis, which causes batches to be completed in a scheduled fixed rate every interval.
|
void |
setCompletionPredicate(org.apache.camel.Predicate completionPredicate)
The completion predicate, which causes batches to be completed when the predicate evaluates as true.
|
void |
setCompletionPredicate(String predicate) |
void |
setCompletionSize(int completionSize)
The number of messages consumed at which the batch will be completed
|
void |
setCompletionTimeout(int completionTimeout)
The timeout in millis from receipt of the first first message when the batch will be completed.
|
void |
setConsumerCount(int consumerCount)
The number of JMS sessions to consume from
|
void |
setEagerCheckCompletion(boolean eagerCheckCompletion)
Use eager completion checking which means that the completionPredicate will use the incoming Exchange.
|
void |
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy)
To use a custom HeaderFilterStrategy to filter header to and from Camel message.
|
void |
setIncludeAllJMSXProperties(boolean includeAllJMSXProperties)
Whether to include all JMSXxxx properties when mapping from JMS to Camel Message.
|
void |
setJmsKeyFormatStrategy(JmsKeyFormatStrategy jmsKeyFormatStrategy)
Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS specification.
|
void |
setKeepAliveDelay(int keepAliveDelay)
The delay in millis between attempts to re-establish a valid session.
|
void |
setMapJmsMessage(boolean mapJmsMessage)
Specifies whether Camel should auto map the received JMS message to a suited payload type, such as javax.jms.TextMessage to a String etc.
|
void |
setMessageCreatedStrategy(MessageCreatedStrategy messageCreatedStrategy)
To use the given MessageCreatedStrategy which are invoked when Camel creates new instances of javax.jms.Message
objects when Camel is sending a JMS message.
|
void |
setPollDuration(int pollDuration)
The duration in milliseconds of each poll for messages.
|
void |
setRecoveryInterval(int recoveryInterval)
Specifies the interval between recovery attempts, i.e.
|
void |
setSendEmptyMessageWhenIdle(boolean sendEmptyMessageWhenIdle)
If using completion timeout or interval, then the batch may be empty if the timeout triggered and there was no messages in the batch.
|
void |
setTimeoutCheckerExecutorService(ScheduledExecutorService timeoutCheckerExecutorService)
If using the completionInterval option a background thread is created to trigger the completion interval.
|
configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, doStart, doStop, equals, getCamelContext, getConsumerProperties, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, init, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public static final int DEFAULT_COMPLETION_SIZE
public static final int DEFAULT_COMPLETION_TIMEOUT
public SjmsBatchComponent getComponent()
getComponent
in class org.apache.camel.support.DefaultEndpoint
public org.apache.camel.Producer createProducer() throws Exception
createProducer
in interface org.apache.camel.Endpoint
Exception
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
createConsumer
in interface org.apache.camel.Endpoint
Exception
public org.apache.camel.Exchange createExchange(javax.jms.Message message, javax.jms.Session session)
public JmsBinding getBinding()
protected JmsBinding createBinding()
JmsBinding
to use.public void setBinding(JmsBinding binding)
public org.apache.camel.AggregationStrategy getAggregationStrategy()
public void setAggregationStrategy(org.apache.camel.AggregationStrategy aggregationStrategy)
public String getDestinationName()
public int getConsumerCount()
public void setConsumerCount(int consumerCount)
public int getCompletionSize()
public void setCompletionSize(int completionSize)
public int getCompletionTimeout()
public void setCompletionTimeout(int completionTimeout)
public int getCompletionInterval()
public void setCompletionInterval(int completionInterval)
public org.apache.camel.Predicate getCompletionPredicate()
public void setCompletionPredicate(org.apache.camel.Predicate completionPredicate)
public void setCompletionPredicate(String predicate)
public boolean isEagerCheckCompletion()
public void setEagerCheckCompletion(boolean eagerCheckCompletion)
public boolean isSendEmptyMessageWhenIdle()
public void setSendEmptyMessageWhenIdle(boolean sendEmptyMessageWhenIdle)
public int getPollDuration()
public void setPollDuration(int pollDuration)
public boolean isAllowNullBody()
public void setAllowNullBody(boolean allowNullBody)
public boolean isMapJmsMessage()
public void setMapJmsMessage(boolean mapJmsMessage)
public MessageCreatedStrategy getMessageCreatedStrategy()
public void setMessageCreatedStrategy(MessageCreatedStrategy messageCreatedStrategy)
public JmsKeyFormatStrategy getJmsKeyFormatStrategy()
public void setJmsKeyFormatStrategy(JmsKeyFormatStrategy jmsKeyFormatStrategy)
public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
getHeaderFilterStrategy
in interface org.apache.camel.spi.HeaderFilterStrategyAware
public void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy)
setHeaderFilterStrategy
in interface org.apache.camel.spi.HeaderFilterStrategyAware
public boolean isIncludeAllJMSXProperties()
public void setIncludeAllJMSXProperties(boolean includeAllJMSXProperties)
public ScheduledExecutorService getTimeoutCheckerExecutorService()
public void setTimeoutCheckerExecutorService(ScheduledExecutorService timeoutCheckerExecutorService)
public boolean isAsyncStartListener()
public void setAsyncStartListener(boolean asyncStartListener)
public int getRecoveryInterval()
public void setRecoveryInterval(int recoveryInterval)
public void setKeepAliveDelay(int keepAliveDelay)
public int getKeepAliveDelay()
Apache Camel