camel-sjms2-kafka-connector source configuration
Connector description: Send and receive messages to/from a JMS Queue or Topic using plain JMS 2.x API.
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 46 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.connectionFactory |
The connection factory to be use. A connection factory must be configured either on the component or endpoint. |
null |
false |
MEDIUM |
camel.source.endpoint.disableReplyTo |
Specifies whether Camel ignores the JMSReplyTo header in messages. If true, Camel does not send a reply back to the destination specified in the JMSReplyTo header. You can use this option if you want Camel to consume from a route and you do not want Camel to automatically send back a reply message because another component in your code handles the reply message. You can also use this option if you want to use Camel as a proxy between different message brokers and you want to route message from one system to another. |
false |
false |
MEDIUM |
camel.source.endpoint.replyTo |
Provides an explicit ReplyTo destination (overrides any incoming value of Message.getJMSReplyTo() in consumer). |
null |
false |
MEDIUM |
camel.source.endpoint.testConnectionOnStartup |
Specifies whether to test the connection on startup. This ensures that when Camel starts that all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted then Camel throws an exception on startup. This ensures that Camel is not started with failed connections. The JMS producers is tested as well. |
false |
false |
MEDIUM |
camel.source.endpoint.asyncConsumer |
Whether the JmsConsumer processes the Exchange asynchronously. If enabled then the JmsConsumer may pickup the next message from the JMS queue, while the previous message is being processed asynchronously (by the Asynchronous Routing Engine). This means that messages may be processed not 100% strictly in order. If disabled (as default) then the Exchange is fully processed before the JmsConsumer will pickup the next message from the JMS queue. Note if transacted has been enabled, then asyncConsumer=true does not run asynchronously, as transaction must be executed synchronously (Camel 3.0 may support async transactions). |
false |
false |
MEDIUM |
camel.source.endpoint.autoStartup |
Specifies whether the consumer container should auto-startup. |
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.clientId |
Sets the JMS client ID to use. Note that this value, if specified, must be unique and can only be used by a single JMS connection instance. It is typically only required for durable topic subscriptions. If using Apache ActiveMQ you may prefer to use Virtual Topics instead. |
null |
false |
MEDIUM |
camel.source.endpoint.concurrentConsumers |
Specifies the default number of concurrent consumers when consuming from JMS (not for request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down of threads. When doing request/reply over JMS then the option replyToConcurrentConsumers is used to control number of concurrent consumers on the reply message listener. |
1 |
false |
MEDIUM |
camel.source.endpoint.durable |
Sets topic consumer to durable. |
false |
false |
MEDIUM |
camel.source.endpoint.durableSubscriptionName |
The durable subscriber name for specifying durable topic subscriptions. The clientId option must be configured as well. |
null |
false |
MEDIUM |
camel.source.endpoint.replyToDeliveryPersistent |
Specifies whether to use persistent delivery by default for replies. |
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.eagerLoadingOfProperties |
Enables eager loading of JMS properties and payload as soon as a message is loaded which generally is inefficient as the JMS properties may not be required but sometimes can catch early any issues with the underlying JMS provider and the use of JMS properties. See also the option eagerPoisonBody. |
false |
false |
MEDIUM |
camel.source.endpoint.eagerPoisonBody |
If eagerLoadingOfProperties is enabled and the JMS message payload (JMS body or JMS properties) is poison (cannot be read/mapped), then set this text as the message body instead so the message can be processed (the cause of the poison are already stored as exception on the Exchange). This can be turned off by setting eagerPoisonBody=false. See also the option eagerLoadingOfProperties. |
"Poison JMS message due to ${exception.message}" |
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.replyToSameDestination Allowed |
Whether a JMS consumer is allowed to send a reply message to the same destination that the consumer is using to consume from. This prevents an endless loop by consuming and sending back the same message to itself. |
false |
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.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.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. |
5000L |
false |
MEDIUM |
camel.source.endpoint.synchronous |
Sets whether synchronous processing should be strictly used |
false |
false |
MEDIUM |
camel.source.endpoint.transferException |
If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option takes precedence. The caught exception is required to be serializable. The original Exception on the consumer side can be wrapped in an outer exception such as org.apache.camel.RuntimeCamelException when returned to the producer. Use this with caution as the data is using Java Object serialization and requires the received to be able to deserialize the data at Class level, which forces a strong coupling between the producers and consumer! |
false |
false |
MEDIUM |
camel.source.endpoint.transacted |
Specifies whether to use transacted mode |
false |
false |
MEDIUM |
camel.component.sjms2.connectionFactory |
The connection factory to be use. A connection factory must be configured either on the component or endpoint. |
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.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.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.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. |
5000L |
false |
MEDIUM |
camel.component.sjms2.replyToOnTimeoutMax ConcurrentConsumers |
Specifies the maximum number of concurrent consumers for continue routing when timeout occurred when using request/reply over JMS. |
1 |
false |
MEDIUM |
camel.component.sjms2.requestTimeoutChecker Interval |
Configures how often Camel should check for timed out Exchanges when doing request/reply over JMS. By default Camel checks once per second. But if you must react faster when a timeout occurs, then you can lower this interval, to check more frequently. The timeout is determined by the option requestTimeout. |
1000L |
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 |
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.