Simple JMS

Simple JMS

Scheme: sjms

A JMS Endpoint

Name Kind Type Required Deprecated Default Value Enum Values Description
destinationType path java.lang.String false queue queue
topic
The kind of destination to use
destinationName path java.lang.String true false DestinationName is a JMS queue or topic name. By default, the destinationName is interpreted as a queue name.
synchronous parameter boolean false true Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
headerFilterStrategy parameter org.apache.camel.spi.HeaderFilterStrategy false To use a custom HeaderFilterStrategy to filter header to and from Camel message.
includeAllJMSXProperties parameter boolean false 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.
transacted parameter boolean false Specifies whether to use transacted mode
namedReplyTo parameter java.lang.String false Sets the reply to destination name used for InOut producer endpoints.
acknowledgementMode parameter org.apache.camel.component.sjms.jms.SessionAcknowledgementType false AUTO_ACKNOWLEDGE SESSION_TRANSACTED
CLIENT_ACKNOWLEDGE
AUTO_ACKNOWLEDGE
DUPS_OK_ACKNOWLEDGE
The JMS acknowledgement name, which is one of: SESSION_TRANSACTED, CLIENT_ACKNOWLEDGE, AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE
producerCount parameter int false 1 Sets the number of producers used for this endpoint.
consumerCount parameter int false 1 Sets the number of consumer listeners used for this endpoint.
ttl parameter long false -1 Flag used to adjust the Time To Live value of produced messages.
persistent parameter boolean false true Flag used to enable/disable message persistence.
durableSubscriptionId parameter java.lang.String false Sets the durable subscription Id required for durable topics.
responseTimeOut parameter long false 5000 Sets the amount of time we should wait before timing out a InOut response.
messageSelector parameter java.lang.String false Sets the JMS Message selector syntax.
transactionBatchCount parameter int false -1 If transacted sets the number of messages to process before committing a transaction.
transactionBatchTimeout parameter long false 5000 Sets timeout (in millis) for batch transactions, the value should be 1000 or higher.
asyncStartListener parameter boolean false 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.
asyncStopListener parameter boolean false Whether to stop the consumer message listener asynchronously, when stopping a route.
prefillPool parameter boolean false true Whether to prefill the producer connection pool on startup, or create connections lazy when needed.
allowNullBody parameter boolean false true Whether to allow sending messages with no body. If this option is false and the message body is null, then an JMSException is thrown.
mapJmsMessage parameter boolean false true 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.
transactionCommitStrategy parameter org.apache.camel.component.sjms.TransactionCommitStrategy false Sets the commit strategy.
destinationCreationStrategy parameter org.apache.camel.component.sjms.jms.DestinationCreationStrategy false To use a custom DestinationCreationStrategy.
messageCreatedStrategy parameter org.apache.camel.component.sjms.jms.MessageCreatedStrategy false 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.
jmsKeyFormatStrategy parameter org.apache.camel.component.sjms.jms.JmsKeyFormatStrategy false 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.
exchangePattern parameter org.apache.camel.ExchangePattern false InOnly InOnly
RobustInOnly
InOut
InOptionalOut
OutOnly
RobustOutOnly
OutIn
OutOptionalIn
Sets the default exchange pattern when creating an exchange

sjms consumer

The SjmsConsumer is the base class for the SJMS MessageListener pool.