The sjms component (simple jms) allows messages to be sent to (or consumed from) a JMS Queue or Topic. This component uses plain JMS API where as the jms component uses Spring JMS.
Name | Kind | Group | Required | Default | Type | Enum | Description |
---|---|---|---|---|---|---|---|
destinationType | path | common | queue | java.lang.String | queue topic |
The kind of destination to use | |
destinationName | path | common | true | java.lang.String | DestinationName is a JMS queue or topic name. By default, the destinationName is interpreted as a queue name. | ||
acknowledgementMode | parameter | common | AUTO_ACKNOWLEDGE | org.apache.camel.component.sjms.jms.SessionAcknowledgementType | 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 | |
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. | |||
consumerCount | parameter | consumer | 1 | int | Sets the number of consumer listeners used for this endpoint. | ||
durableSubscriptionId | parameter | consumer | java.lang.String | Sets the durable subscription Id required for durable topics. | |||
synchronous | parameter | consumer | true | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | ||
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 | consumer (advanced) | org.apache.camel.ExchangePattern | InOnly RobustInOnly InOut InOptionalOut OutOnly RobustOutOnly OutIn OutOptionalIn |
Sets the exchange pattern when the consumer creates an exchange. | ||
messageSelector | parameter | consumer (advanced) | java.lang.String | Sets the JMS Message selector syntax. | |||
namedReplyTo | parameter | producer | java.lang.String | Sets the reply to destination name used for InOut producer endpoints. | |||
persistent | parameter | producer | true | boolean | Flag used to enable/disable message persistence. | ||
producerCount | parameter | producer | 1 | int | Sets the number of producers used for this endpoint. | ||
ttl | parameter | producer | -1 | long | Flag used to adjust the Time To Live value of produced messages. | ||
allowNullBody | parameter | producer (advanced) | 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. | ||
prefillPool | parameter | producer (advanced) | true | boolean | Whether to prefill the producer connection pool on startup, or create connections lazy when needed. | ||
responseTimeOut | parameter | producer (advanced) | 5000 | long | Sets the amount of time we should wait before timing out a InOut response. | ||
asyncStartListener | parameter | advanced | boolean | 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 | advanced | boolean | Whether to stop the consumer message listener asynchronously, when stopping a route. | |||
connectionCount | parameter | advanced | java.lang.Integer | The maximum number of connections available to this endpoint | |||
connectionFactory | parameter | advanced | javax.jms.ConnectionFactory | Initializes the connectionFactory for the endpoint, which takes precedence over the component's connectionFactory, if any | |||
connectionResource | parameter | advanced | org.apache.camel.component.sjms.jms.ConnectionResource | Initializes the connectionResource for the endpoint, which takes precedence over the component's connectionResource, if any | |||
destinationCreationStrategy | parameter | advanced | org.apache.camel.component.sjms.jms.DestinationCreationStrategy | To use a custom DestinationCreationStrategy. | |||
headerFilterStrategy | parameter | advanced | org.apache.camel.spi.HeaderFilterStrategy | To use a custom HeaderFilterStrategy to filter header to and from Camel message. | |||
includeAllJMSXProperties | parameter | advanced | 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 | advanced | 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 | advanced | 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 | advanced | 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. | |||
transacted | parameter | transaction | boolean | Specifies whether to use transacted mode | |||
transactionBatchCount | parameter | transaction | -1 | int | If transacted sets the number of messages to process before committing a transaction. | ||
transactionBatchTimeout | parameter | transaction | 5000 | long | Sets timeout (in millis) for batch transactions, the value should be 1000 or higher. | ||
transactionCommitStrategy | parameter | transaction | org.apache.camel.component.sjms.TransactionCommitStrategy | Sets the commit strategy. |
The SjmsConsumer is the base class for the SJMS MessageListener pool.