Simple JMS Batch Component

Simple JMS Batch Component

Scheme: sjms-batch
Syntax: sjms-batch:destinationName
Description: A pure Java JMS Camel Component
Maven: org.apache.camel/camel-sjms/2.16.2
Name Kind Group Required Default Type Enum Description
destinationName path consumer true java.lang.String The destination name. Only queues are supported, names may be prefixed by 'queue:'.
aggregationStrategy parameter consumer true org.apache.camel.processor.aggregate.AggregationStrategy The aggregation strategy to use, which merges all the batched messages into a single message
allowNullBody parameter consumer true boolean Whether to allow sending messages with no body. If this option is false and the message body is null, then an JMSException is thrown.
bridgeErrorHandler parameter consumer boolean Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN/ERROR level and ignored.
completionSize parameter consumer 200 int The number of messages consumed at which the batch will be completed
completionTimeout parameter consumer 500 int The timeout from receipt of the first first message when the batch will be completed
consumerCount parameter consumer 1 int The number of JMS sessions to consume from
headerFilterStrategy parameter consumer org.apache.camel.spi.HeaderFilterStrategy To use a custom HeaderFilterStrategy to filter header to and from Camel message.
includeAllJMSXProperties parameter consumer boolean Whether to include all JMSXxxx properties when mapping from JMS to Camel Message. Setting this to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using a custom headerFilterStrategy then this option does not apply.
jmsKeyFormatStrategy parameter consumer org.apache.camel.component.sjms.jms.JmsKeyFormatStrategy Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS specification. Camel provides two implementations out of the box: default and passthrough. The default strategy will safely marshal dots and hyphens (. and -). The passthrough strategy leaves the key as is. Can be used for JMS brokers which do not care whether JMS header keys contain illegal characters. You can provide your own implementation of the org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the # notation.
mapJmsMessage parameter consumer true boolean Specifies whether Camel should auto map the received JMS message to a suited payload type, such as javax.jms.TextMessage to a String etc. See section about how mapping works below for more details.
messageCreatedStrategy parameter consumer org.apache.camel.component.sjms.jms.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.
pollDuration parameter consumer 1000 int The duration in milliseconds of each poll for messages. completionTimeOut will be used if it is shorter and a batch has started.
exceptionHandler parameter consumer (advanced) org.apache.camel.spi.ExceptionHandler To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions, that will be logged at WARN/ERROR level and ignored.
exchangePattern parameter advanced InOnly org.apache.camel.ExchangePattern InOnly
RobustInOnly
InOut
InOptionalOut
OutOnly
RobustOutOnly
OutIn
OutOptionalIn
Sets the default exchange pattern when creating an exchange
synchronous parameter advanced false boolean Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported).

sjms-batch consumer