camel-sjms2-kafka-connector source configuration
When using camel-sjms2-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-sjms2-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.sjms2.CamelSjms2SourceConnector
The camel-sjms2 source connector supports 52 options, which are listed below.
Name | Description | Default | Required | Priority |
---|---|---|---|---|
camel.source.path.destinationType |
The kind of destination to use One of: [queue] [topic] |
"queue" |
false |
MEDIUM |
camel.source.path.destinationName |
DestinationName is a JMS queue or topic name. By default, the destinationName is interpreted as a queue name. |
null |
true |
HIGH |
camel.source.endpoint.acknowledgementMode |
The JMS acknowledgement name, which is one of: SESSION_TRANSACTED, CLIENT_ACKNOWLEDGE, AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE One of: [SESSION_TRANSACTED] [CLIENT_ACKNOWLEDGE] [AUTO_ACKNOWLEDGE] [DUPS_OK_ACKNOWLEDGE] |
"AUTO_ACKNOWLEDGE" |
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.consumerCount |
Sets the number of consumer listeners used for this endpoint. |
1 |
false |
MEDIUM |
camel.source.endpoint.durable |
Sets topic consumer to durable. |
false |
false |
MEDIUM |
camel.source.endpoint.durableSubscriptionId |
Sets the durable subscription Id required for durable topics. |
null |
false |
MEDIUM |
camel.source.endpoint.reconnectBackOff |
Backoff in millis on consumer pool reconnection attempts |
5000L |
false |
MEDIUM |
camel.source.endpoint.reconnectOnError |
Try to apply reconnection logic on consumer pool |
true |
false |
MEDIUM |
camel.source.endpoint.shared |
Sets the consumer to shared. |
false |
false |
MEDIUM |
camel.source.endpoint.subscriptionId |
Sets the subscription Id, required for durable or shared topics. |
null |
false |
MEDIUM |
camel.source.endpoint.synchronous |
Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). |
true |
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.messageSelector |
Sets the JMS Message selector syntax. |
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.asyncStopListener |
Whether to stop the consumer message listener asynchronously, when stopping a route. |
false |
false |
MEDIUM |
camel.source.endpoint.connectionCount |
The maximum number of connections available to this endpoint |
null |
false |
MEDIUM |
camel.source.endpoint.connectionFactory |
Initializes the connectionFactory for the endpoint, which takes precedence over the component’s connectionFactory, if any |
null |
false |
MEDIUM |
camel.source.endpoint.connectionResource |
Initializes the connectionResource for the endpoint, which takes precedence over the component’s connectionResource, if any |
null |
false |
MEDIUM |
camel.source.endpoint.destinationCreationStrategy |
To use a custom DestinationCreationStrategy. |
null |
false |
MEDIUM |
camel.source.endpoint.exceptionListener |
Specifies the JMS Exception Listener that is to be notified of any underlying JMS exceptions. |
null |
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.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.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.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.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.errorHandlerLoggingLevel |
Allows to configure the default errorHandler logging level for logging uncaught exceptions. One of: [TRACE] [DEBUG] [INFO] [WARN] [ERROR] [OFF] |
"WARN" |
false |
MEDIUM |
camel.source.endpoint.errorHandlerLogStackTrace |
Allows to control whether stacktraces should be logged or not, by the default errorHandler. |
true |
false |
MEDIUM |
camel.source.endpoint.transacted |
Specifies whether to use transacted mode |
false |
false |
MEDIUM |
camel.source.endpoint.transactionBatchCount |
If transacted sets the number of messages to process before committing a transaction. |
-1 |
false |
LOW |
camel.source.endpoint.transactionBatchTimeout |
Sets timeout (in millis) for batch transactions, the value should be 1000 or higher. |
5000L |
false |
LOW |
camel.source.endpoint.transactionCommitStrategy |
Sets the commit strategy. |
null |
false |
MEDIUM |
camel.source.endpoint.sharedJMSSession |
Specifies whether to share JMS session with other SJMS endpoints. Turn this off if your route is accessing to multiple JMS providers. If you need transaction against multiple JMS providers, use jms component to leverage XA transaction. |
true |
false |
MEDIUM |
camel.component.sjms2.connectionCount |
The maximum number of connections available to endpoints started under this component |
"1" |
false |
MEDIUM |
camel.component.sjms2.connectionFactory |
A ConnectionFactory is required to enable the SjmsComponent. It can be set directly or set set as part of a ConnectionResource. |
null |
false |
MEDIUM |
camel.component.sjms2.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.sjms2.reconnectBackOff |
Backoff in millis on consumer pool reconnection attempts |
5000L |
false |
MEDIUM |
camel.component.sjms2.reconnectOnError |
Try to apply reconnection logic on consumer pool |
true |
false |
MEDIUM |
camel.component.sjms2.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.sjms2.connectionClientId |
The client ID to use when creating javax.jms.Connection when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource. |
null |
false |
MEDIUM |
camel.component.sjms2.connectionMaxWait |
The max wait time in millis to block and wait on free connection when the pool is exhausted when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource. |
5000L |
false |
MEDIUM |
camel.component.sjms2.connectionResource |
A ConnectionResource is an interface that allows for customization and container control of the ConnectionFactory. See Plugable Connection Resource Management for further details. |
null |
false |
MEDIUM |
camel.component.sjms2.connectionTestOnBorrow |
When using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource then should each javax.jms.Connection be tested (calling start) before returned from the pool. |
true |
false |
MEDIUM |
camel.component.sjms2.destinationCreationStrategy |
To use a custom DestinationCreationStrategy. |
null |
false |
MEDIUM |
camel.component.sjms2.jmsKeyFormatStrategy |
Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS specification. Camel provides one implementation out of the box: default. The default strategy will safely marshal dots and hyphens (. and -). 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.component.sjms2.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.component.sjms2.timedTaskManager |
To use a custom TimedTaskManager |
null |
false |
MEDIUM |
camel.component.sjms2.headerFilterStrategy |
To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message. |
null |
false |
MEDIUM |
camel.component.sjms2.connectionPassword |
The password to use when creating javax.jms.Connection when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource. |
null |
false |
MEDIUM |
camel.component.sjms2.connectionUsername |
The username to use when creating javax.jms.Connection when using the default org.apache.camel.component.sjms.jms.ConnectionFactoryResource. |
null |
false |
MEDIUM |
camel.component.sjms2.transactionCommitStrategy |
To configure which kind of commit strategy to use. Camel provides two implementations out of the box, default and batch. |
null |
false |
MEDIUM |
The camel-sjms2 source connector has no converters out of the box.
The camel-sjms2 source connector has no transforms out of the box.
The camel-sjms2 source connector has no aggregation strategies out of the box.
Do not use activemq-all 5.16.0 or older with the SJMS2 connector The activemq-all jar contains packages older versions of Camel that cause conflict when trying to run the SJMS2 connector. You may find very interesting errors such as java.lang.NoSuchMethodError: org.apache.camel.main.Main.configure()Lorg/apache/camel/main/MainConfigurationProperties when trying to do so. |