@ComponentProfile(summary="Pickup messages from a JMS broker (queue or topic) by actively polling it", tag="consumer,jms", recommended=NullConnection.class) public class JmsPollingConsumer extends JmsPollingConsumerImpl
JmsPollingConsumerImpl
implementation that can target queues or topics via an
RFC6167 style destination.
This differs from the standard PtpPollingConsumer
and PasPollingConsumer
in that
it supports a destination that is specified in RFC6167 style. For instance
jms:queue:myQueueName
will consume from a queue called myQueueName
and
jms:topic:myTopicName
from a topic called myTopicName
If you specify a topic as the destination then you should also configure
JmsPollingConsumerImpl.setClientId(String)
. There are also some custom parameters that are used as part of the
URI defining the topic.
subscriptionId
- which indicates the subscriptionId that should be used when
attaching a subscriber to a topic; jms:topic:MyTopicName?subscriptionId=myId
would return
a JmsDestination.subscriptionId()
of myId
. This must be specified.noLocal
- which corresponds to the
Session.createConsumer(javax.jms.Destination, String, boolean)
noLocal setting.
This defaults to false, if not specified.For instance you could have the following destinations:
In the adapter configuration file this class is aliased as jms-poller which is the preferred alternative to the fully qualified classname when building your configuration.
AdaptrisPollingConsumer.LockOperator
log
Constructor and Description |
---|
JmsPollingConsumer() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
configuredEndpoint() |
protected javax.jms.MessageConsumer |
createConsumer() |
java.lang.String |
getEndpoint()
The JMS destination in RFC6167 format.
|
void |
setEndpoint(java.lang.String endpoint)
The JMS destination in RFC6167 format.
|
JmsPollingConsumer |
withEndpoint(java.lang.String s) |
additionalDebug, close, configuredClientId, configuredPassword, configuredUserName, configuredVendorImplementation, createConnectionFactory, createSession, currentLogger, endpoint, getAdditionalDebug, getClientId, getDestination, getPassword, getUserName, getVendorImplementation, messageSelector, newThreadName, prepareConsumer, processMessages, setAdditionalDebug, setClientId, setDestination, setPassword, setUserName, setVendorImplementation
closeMessageConsumer, closeSession, configuredAcknowledgeMode, configuredCorrelationIdSource, configuredMessageListener, configuredMessageTranslator, consumeLocationKey, currentSession, doProcessMessage, getAcknowledgeMode, getCorrelationIdSource, getMessageSelector, getMessageTranslator, getReceiveTimeout, init, initConsumer, initSession, isManagedTransaction, messageConsumer, messageHandler, rollbackTimeout, setAcknowledgeMode, setCorrelationIdSource, setManagedTransaction, setMessageSelector, setMessageTranslator, setReceiveTimeout
continueProcessingMessages, getMaxMessagesPerPoll, getPoller, getReacquireLockBetweenMessages, prepare, releaseLock, setMaxMessagesPerPoll, setPoller, setReacquireLockBetweenMessages, start, stop
changeState, registerAdaptrisMessageListener, renameThread, requestClose, requestInit, requestStart, requestStop, retrieveAdaptrisMessageListener, retrieveComponentState
createName, createQualifier, decode, encode, getEncoder, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsTrackingEndpoint, setMessageFactory, setUniqueId, withMessageFactory, withUniqueID
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decode, encode, getEncoder, getMessageFactory, handleConnectionException, registerConnection, retrieveConnection, setEncoder, setMessageFactory
getUniqueId
createName, createQualifier, isTrackingEndpoint
public JmsPollingConsumer withEndpoint(java.lang.String s)
protected javax.jms.MessageConsumer createConsumer() throws javax.jms.JMSException
createConsumer
in class JmsPollingConsumerImpl
javax.jms.JMSException
protected java.lang.String configuredEndpoint()
configuredEndpoint
in class JmsPollingConsumerImpl
public java.lang.String getEndpoint()
public void setEndpoint(java.lang.String endpoint)