camel-sjms-batch-kafka-connector source configuration
Connector description: Highly performant and transactional batch consumption of messages from a JMS queue.
When using camel-sjms-batch-kafka-connector as source make sure to use the following Maven dependency to have support for the connector:
<dependency>
<groupId>org.apache.camel.kafkaconnector</groupId>
<artifactId>camel-sjms-batch-kafka-connector</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel Kafka connector version -->
</dependency>
To use this Source connector in Kafka connect you’ll need to set the following connector.class
connector.class=org.apache.camel.kafkaconnector.sjmsbatch.CamelSjmsbatchSourceConnector
The camel-sjms-batch source connector supports 30 options, which are listed below.
Name | Description | Default | Required | Priority |
---|---|---|---|---|
camel.source.path.destinationName |
The destination name. Only queues are supported, names may be prefixed by 'queue:'. |
null |
true |
HIGH |
camel.source.endpoint.aggregationStrategy |
The aggregation strategy to use, which merges all the batched messages into a single message |
null |
true |
HIGH |
camel.source.endpoint.allowNullBody |
Whether to allow sending messages with no body. If this option is false and the message body is null, then an JMSException is thrown. |
true |
false |
MEDIUM |
camel.source.endpoint.bridgeErrorHandler |
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 or ERROR level and ignored. |
false |
false |
MEDIUM |
camel.source.endpoint.completionInterval |
The completion interval in millis, which causes batches to be completed in a scheduled fixed rate every interval. The batch may be empty if the timeout triggered and there was no messages in the batch. Notice you cannot use both completion timeout and completion interval at the same time, only one can be configured. |
1000 |
false |
MEDIUM |
camel.source.endpoint.completionPredicate |
The completion predicate, which causes batches to be completed when the predicate evaluates as true. The predicate can also be configured using the simple language using the string syntax. You may want to set the option eagerCheckCompletion to true to let the predicate match the incoming message, as otherwise it matches the aggregated message. |
null |
false |
MEDIUM |
camel.source.endpoint.completionSize |
The number of messages consumed at which the batch will be completed |
200 |
false |
MEDIUM |
camel.source.endpoint.completionTimeout |
The timeout in millis from receipt of the first first message when the batch will be completed. The batch may be empty if the timeout triggered and there was no messages in the batch. Notice you cannot use both completion timeout and completion interval at the same time, only one can be configured. |
500 |
false |
MEDIUM |
camel.source.endpoint.consumerCount |
The number of JMS sessions to consume from |
1 |
false |
MEDIUM |
camel.source.endpoint.eagerCheckCompletion |
Use eager completion checking which means that the completionPredicate will use the incoming Exchange. As opposed to without eager completion checking the completionPredicate will use the aggregated Exchange. |
false |
false |
MEDIUM |
camel.source.endpoint.includeAllJMSXProperties |
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. |
false |
false |
MEDIUM |
camel.source.endpoint.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. See section about how mapping works below for more details. |
true |
false |
MEDIUM |
camel.source.endpoint.pollDuration |
The duration in milliseconds of each poll for messages. completionTimeOut will be used if it is shorter and a batch has started. |
1000 |
false |
MEDIUM |
camel.source.endpoint.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. If this option is true and the batch is empty then an empty message is added to the batch so an empty message is routed. |
false |
false |
MEDIUM |
camel.source.endpoint.exceptionHandler |
To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. |
null |
false |
MEDIUM |
camel.source.endpoint.exchangePattern |
Sets the exchange pattern when the consumer creates an exchange. One of: [InOnly] [InOut] [InOptionalOut] |
null |
false |
MEDIUM |
camel.source.endpoint.asyncStartListener |
Whether to startup the consumer message listener asynchronously, when starting a route. For example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while retrying and/or failover. This will cause Camel to block while starting routes. By setting this option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker using a dedicated thread in asynchronous mode. If this option is used, then beware that if the connection could not be established, then an exception is logged at WARN level, and the consumer will not be able to receive messages; You can then restart the route to retry. |
false |
false |
MEDIUM |
camel.source.endpoint.headerFilterStrategy |
To use a custom HeaderFilterStrategy to filter header to and from Camel message. |
null |
false |
MEDIUM |
camel.source.endpoint.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. |
null |
false |
MEDIUM |
camel.source.endpoint.keepAliveDelay |
The delay in millis between attempts to re-establish a valid session. If this is a positive value the SjmsBatchConsumer will attempt to create a new session if it sees an Exception during message consumption. This delay value allows you to pause between attempts to prevent spamming the logs. If this is a negative value then the SjmsBatchConsumer will bail out and the consumer will not stop consuming new messages. The default is 5000 ms, that is, 5 seconds. |
5000 |
false |
MEDIUM |
camel.source.endpoint.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. |
null |
false |
MEDIUM |
camel.source.endpoint.recoveryInterval |
Specifies the interval between recovery attempts, i.e. when a connection is being refreshed, in milliseconds. The default is 5000 ms, that is, 5 seconds. |
5000 |
false |
MEDIUM |
camel.source.endpoint.synchronous |
Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). |
false |
false |
MEDIUM |
camel.source.endpoint.timeoutCheckerExecutor Service |
If using the completionInterval option a background thread is created to trigger the completion interval. Set this option to provide a custom thread pool to be used rather than creating a new thread for every consumer. |
null |
false |
MEDIUM |
camel.component.sjms-batch.bridgeErrorHandler |
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 or ERROR level and ignored. |
false |
false |
MEDIUM |
camel.component.sjms-batch.asyncStartListener |
Whether to startup the consumer message listener asynchronously, when starting a route. For example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while retrying and/or failover. This will cause Camel to block while starting routes. By setting this option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker using a dedicated thread in asynchronous mode. If this option is used, then beware that if the connection could not be established, then an exception is logged at WARN level, and the consumer will not be able to receive messages; You can then restart the route to retry. |
false |
false |
MEDIUM |
camel.component.sjms-batch.autowiredEnabled |
Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. |
true |
false |
MEDIUM |
camel.component.sjms-batch.connectionFactory |
A ConnectionFactory is required to enable the SjmsBatchComponent. |
null |
false |
MEDIUM |
camel.component.sjms-batch.recoveryInterval |
Specifies the interval between recovery attempts, i.e. when a connection is being refreshed, in milliseconds. The default is 5000 ms, that is, 5 seconds. |
5000 |
false |
MEDIUM |
camel.component.sjms-batch.headerFilterStrategy |
To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message. |
null |
false |
MEDIUM |
The camel-sjms-batch source connector has no converters out of the box.
The camel-sjms-batch source connector has no transforms out of the box.
The camel-sjms-batch source connector has no aggregation strategies out of the box.