@UriEndpoint(firstVersion="2.11.0",
scheme="sjms",
title="Simple JMS",
syntax="sjms:destinationType:destinationName",
label="messaging")
public class SjmsEndpoint
extends org.apache.camel.support.DefaultEndpoint
implements org.apache.camel.AsyncEndpoint, org.apache.camel.MultipleConsumersSupport, org.apache.camel.spi.HeaderFilterStrategyAware
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
SjmsEndpoint() |
SjmsEndpoint(String uri,
org.apache.camel.Component component,
String remaining) |
Modifier and Type | Method and Description |
---|---|
protected JmsBinding |
createBinding()
Creates the
JmsBinding to use. |
protected ConnectionResource |
createConnectionResource(Object source) |
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Exchange |
createExchange(javax.jms.Message message,
javax.jms.Session session) |
org.apache.camel.Producer |
createProducer() |
protected void |
doStart() |
protected void |
doStop() |
SessionAcknowledgementType |
getAcknowledgementMode() |
JmsBinding |
getBinding() |
SjmsComponent |
getComponent() |
int |
getConnectionCount() |
javax.jms.ConnectionFactory |
getConnectionFactory() |
ConnectionResource |
getConnectionResource() |
int |
getConsumerCount() |
DestinationCreationStrategy |
getDestinationCreationStrategy() |
String |
getDestinationName() |
String |
getDurableSubscriptionId() |
org.apache.camel.LoggingLevel |
getErrorHandlerLoggingLevel() |
javax.jms.ExceptionListener |
getExceptionListener() |
org.apache.camel.spi.HeaderFilterStrategy |
getHeaderFilterStrategy() |
JmsKeyFormatStrategy |
getJmsKeyFormatStrategy() |
JmsObjectFactory |
getJmsObjectFactory() |
MessageCreatedStrategy |
getMessageCreatedStrategy() |
String |
getMessageSelector() |
String |
getNamedReplyTo() |
int |
getProducerCount() |
long |
getResponseTimeOut() |
int |
getSessionCount()
Deprecated.
|
int |
getTransactionBatchCount() |
long |
getTransactionBatchTimeout() |
TransactionCommitStrategy |
getTransactionCommitStrategy() |
long |
getTtl() |
boolean |
isAllowNullBody() |
boolean |
isAsyncStartListener() |
boolean |
isAsyncStopListener() |
boolean |
isErrorHandlerLogStackTrace() |
boolean |
isIncludeAllJMSXProperties() |
boolean |
isMapJmsMessage() |
boolean |
isMultipleConsumersSupported() |
boolean |
isPersistent() |
boolean |
isPrefillPool() |
boolean |
isSharedJMSSession() |
boolean |
isSynchronous() |
boolean |
isTopic()
Flag set by the endpoint used by consumers and producers to determine if
the endpoint is a JMS Topic.
|
boolean |
isTransacted() |
void |
setAcknowledgementMode(SessionAcknowledgementType acknowledgementMode)
The JMS acknowledgement name, which is one of: SESSION_TRANSACTED, CLIENT_ACKNOWLEDGE, AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE
|
void |
setAllowNullBody(boolean allowNullBody)
Whether to allow sending messages with no body.
|
void |
setAsyncStartListener(boolean asyncStartListener)
Whether to startup the consumer message listener asynchronously, when starting a route.
|
void |
setAsyncStopListener(boolean asyncStopListener)
Whether to stop the consumer message listener asynchronously, when stopping a route.
|
void |
setBinding(JmsBinding binding)
Sets the binding used to convert from a Camel message to and from a JMS
message
|
void |
setConnectionCount(Integer connectionCount)
The maximum number of connections available to this endpoint
|
void |
setConnectionFactory(String connectionFactory)
Initializes the connectionFactory for the endpoint, which takes precedence over the component's connectionFactory, if any
|
void |
setConnectionResource(String connectionResource)
Initializes the connectionResource for the endpoint, which takes precedence over the component's connectionResource, if any
|
void |
setConsumerCount(int consumerCount)
Sets the number of consumer listeners used for this endpoint.
|
void |
setDestinationCreationStrategy(DestinationCreationStrategy destinationCreationStrategy)
To use a custom DestinationCreationStrategy.
|
void |
setDestinationName(String destinationName)
DestinationName is a JMS queue or topic name.
|
void |
setDurableSubscriptionId(String durableSubscriptionId)
Sets the durable subscription Id required for durable topics.
|
void |
setErrorHandlerLoggingLevel(org.apache.camel.LoggingLevel errorHandlerLoggingLevel)
Allows to configure the default errorHandler logging level for logging uncaught exceptions.
|
void |
setErrorHandlerLogStackTrace(boolean errorHandlerLogStackTrace)
Allows to control whether stacktraces should be logged or not, by the default errorHandler.
|
void |
setExceptionListener(javax.jms.ExceptionListener exceptionListener)
Specifies the JMS Exception Listener that is to be notified of any underlying JMS exceptions.
|
void |
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy)
To use a custom HeaderFilterStrategy to filter header to and from Camel message.
|
void |
setIncludeAllJMSXProperties(boolean includeAllJMSXProperties)
Whether to include all JMSXxxx properties when mapping from JMS to Camel Message.
|
void |
setJmsKeyFormatStrategy(JmsKeyFormatStrategy jmsKeyFormatStrategy)
Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS specification.
|
void |
setJmsObjectFactory(JmsObjectFactory jmsObjectFactory)
To use a custom Jms Object factory
|
void |
setMapJmsMessage(boolean 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.
|
void |
setMessageCreatedStrategy(MessageCreatedStrategy 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.
|
void |
setMessageSelector(String messageSelector)
Sets the JMS Message selector syntax.
|
void |
setNamedReplyTo(String namedReplyTo)
Sets the reply to destination name used for InOut producer endpoints.
|
void |
setPersistent(boolean persistent)
Flag used to enable/disable message persistence.
|
void |
setPrefillPool(boolean prefillPool)
Whether to prefill the producer connection pool on startup, or create connections lazy when needed.
|
void |
setProducerCount(int producerCount)
Sets the number of producers used for this endpoint.
|
void |
setResponseTimeOut(long responseTimeOut)
Sets the amount of time we should wait before timing out a InOut response.
|
void |
setSessionCount(int sessionCount)
Deprecated.
|
void |
setSharedJMSSession(boolean share)
Specifies whether to share JMS session with other SJMS endpoints.
|
void |
setSynchronous(boolean synchronous)
Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
|
void |
setTransacted(boolean transacted)
Specifies whether to use transacted mode
|
void |
setTransactionBatchCount(int transactionBatchCount)
If transacted sets the number of messages to process before committing a transaction.
|
void |
setTransactionBatchTimeout(long transactionBatchTimeout)
Sets timeout (in millis) for batch transactions, the value should be 1000 or higher.
|
void |
setTransactionCommitStrategy(TransactionCommitStrategy transactionCommitStrategy)
Sets the commit strategy.
|
void |
setTtl(long ttl)
Flag used to adjust the Time To Live value of produced messages.
|
configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getConsumerProperties, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, toString
doResume, doShutdown, doSuspend, getStatus, init, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public SjmsComponent getComponent()
getComponent
in class org.apache.camel.support.DefaultEndpoint
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.DefaultEndpoint
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.DefaultEndpoint
Exception
public org.apache.camel.Producer createProducer() throws Exception
createProducer
in interface org.apache.camel.Endpoint
Exception
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
createConsumer
in interface org.apache.camel.Endpoint
Exception
public boolean isMultipleConsumersSupported()
isMultipleConsumersSupported
in interface org.apache.camel.MultipleConsumersSupport
protected ConnectionResource createConnectionResource(Object source)
public org.apache.camel.Exchange createExchange(javax.jms.Message message, javax.jms.Session session)
public JmsBinding getBinding()
protected JmsBinding createBinding()
JmsBinding
to use.public void setBinding(JmsBinding binding)
public void setDestinationName(String destinationName)
public String getDestinationName()
public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
getHeaderFilterStrategy
in interface org.apache.camel.spi.HeaderFilterStrategyAware
public void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy strategy)
setHeaderFilterStrategy
in interface org.apache.camel.spi.HeaderFilterStrategyAware
public boolean isIncludeAllJMSXProperties()
public void setIncludeAllJMSXProperties(boolean includeAllJMSXProperties)
public ConnectionResource getConnectionResource()
public void setConnectionResource(String connectionResource)
public boolean isSynchronous()
isSynchronous
in class org.apache.camel.support.DefaultEndpoint
public void setSynchronous(boolean synchronous)
setSynchronous
in class org.apache.camel.support.DefaultEndpoint
public SessionAcknowledgementType getAcknowledgementMode()
public void setAcknowledgementMode(SessionAcknowledgementType acknowledgementMode)
public boolean isTopic()
@Deprecated public int getSessionCount()
@Deprecated public void setSessionCount(int sessionCount)
sessionCount
- the number of Session instances, default is 1public int getProducerCount()
public void setProducerCount(int producerCount)
public int getConsumerCount()
public void setConsumerCount(int consumerCount)
public long getTtl()
public void setTtl(long ttl)
public boolean isPersistent()
public void setPersistent(boolean persistent)
public String getDurableSubscriptionId()
public void setDurableSubscriptionId(String durableSubscriptionId)
public long getResponseTimeOut()
public void setResponseTimeOut(long responseTimeOut)
public String getMessageSelector()
public void setMessageSelector(String messageSelector)
public int getTransactionBatchCount()
public void setTransactionBatchCount(int transactionBatchCount)
public long getTransactionBatchTimeout()
public void setTransactionBatchTimeout(long transactionBatchTimeout)
public TransactionCommitStrategy getTransactionCommitStrategy()
public void setTransactionCommitStrategy(TransactionCommitStrategy transactionCommitStrategy)
public boolean isTransacted()
public void setTransacted(boolean transacted)
public boolean isSharedJMSSession()
public void setSharedJMSSession(boolean share)
public String getNamedReplyTo()
public void setNamedReplyTo(String namedReplyTo)
public void setAsyncStartListener(boolean asyncStartListener)
public void setAsyncStopListener(boolean asyncStopListener)
public boolean isAsyncStartListener()
public boolean isAsyncStopListener()
public boolean isPrefillPool()
public void setPrefillPool(boolean prefillPool)
public DestinationCreationStrategy getDestinationCreationStrategy()
public void setDestinationCreationStrategy(DestinationCreationStrategy destinationCreationStrategy)
public boolean isAllowNullBody()
public void setAllowNullBody(boolean allowNullBody)
public boolean isMapJmsMessage()
public void setMapJmsMessage(boolean mapJmsMessage)
public MessageCreatedStrategy getMessageCreatedStrategy()
public void setMessageCreatedStrategy(MessageCreatedStrategy messageCreatedStrategy)
public JmsKeyFormatStrategy getJmsKeyFormatStrategy()
public void setJmsKeyFormatStrategy(JmsKeyFormatStrategy jmsKeyFormatStrategy)
public void setConnectionFactory(String connectionFactory)
public javax.jms.ConnectionFactory getConnectionFactory()
public int getConnectionCount()
public void setConnectionCount(Integer connectionCount)
public javax.jms.ExceptionListener getExceptionListener()
public void setExceptionListener(javax.jms.ExceptionListener exceptionListener)
public org.apache.camel.LoggingLevel getErrorHandlerLoggingLevel()
public void setErrorHandlerLoggingLevel(org.apache.camel.LoggingLevel errorHandlerLoggingLevel)
public boolean isErrorHandlerLogStackTrace()
public void setErrorHandlerLogStackTrace(boolean errorHandlerLogStackTrace)
public JmsObjectFactory getJmsObjectFactory()
public void setJmsObjectFactory(JmsObjectFactory jmsObjectFactory)
Apache Camel