@ComponentProfile(summary="Listen for JMS messages on the specified queue or topic", tag="consumer,jms", recommended=JmsConnection.class) public class JmsConsumer extends JmsConsumerImpl
This differs from the standard PtpConsumer
and PasConsumer
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
While RFC6167 defines the ability to use jndi to lookup the (as part of the 'jndi' variant section); this is not supported. There
is also support for 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
. If a subscription ID is not specified, then a durable subscriber is never created; specifying a subscription ID
automatically means a durable subscriber.
Also supported is the JMS 2.0 sharedConsumerId, should you wish to create a multiple load balancing consumers on a single topic endpoint;
jms:topic:MyTopicName?sharedConsumerId=12345
In the adapter configuration file this class is aliased as jms-consumer which is the preferred alternative to the fully qualified classname when building your configuration.
consumer
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
JmsConsumer() |
JmsConsumer(ConsumeDestination d) |
Modifier and Type | Method and Description |
---|---|
protected javax.jms.MessageConsumer |
createConsumer() |
protected java.lang.Boolean |
deferConsumerCreationToVendor() |
java.lang.Boolean |
getDeferConsumerCreationToVendor()
Returns a boolean value which determines if the JMS message consumer should be created by the configured vendor implementation or not.
|
void |
setDeferConsumerCreationToVendor(java.lang.Boolean deferConsumerCreationToVendor)
Set to true if you wish to let the JMS message consumer be created by the specific vendor implementation.
|
close, configuredAcknowledgeMode, configuredCorrelationIdSource, configuredMessageListener, configuredMessageTranslator, consumeLocationKey, currentLogger, currentSession, getAcknowledgeMode, getCorrelationIdSource, getMessageTranslator, init, isManagedTransaction, onMessage, prepare, rollbackTimeout, setAcknowledgeMode, setCorrelationIdSource, setManagedTransaction, setMessageTranslator, start, stop
changeState, getDestination, registerAdaptrisMessageListener, renameThread, requestClose, requestInit, requestStart, requestStop, retrieveAdaptrisMessageListener, retrieveComponentState, setDestination
createName, createQualifier, decode, encode, getEncoder, getIsTrackingEndpoint, getMessageFactory, getUniqueId, handleConnectionException, isTrackingEndpoint, registerConnection, registerEncoderMessageFactory, retrieveConnection, setEncoder, setIsTrackingEndpoint, setMessageFactory, setUniqueId, withMessageFactory
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 JmsConsumer()
public JmsConsumer(ConsumeDestination d)
protected javax.jms.MessageConsumer createConsumer() throws javax.jms.JMSException, CoreException
createConsumer
in class JmsConsumerImpl
javax.jms.JMSException
CoreException
protected java.lang.Boolean deferConsumerCreationToVendor()
public java.lang.Boolean getDeferConsumerCreationToVendor()
Returns a boolean value which determines if the JMS message consumer should be created by the configured vendor implementation or not.
Generally this will be false or null, such is the default. When false/null a standard JMS message consumer will be created.
public void setDeferConsumerCreationToVendor(java.lang.Boolean deferConsumerCreationToVendor)
Set to true if you wish to let the JMS message consumer be created by the specific vendor implementation.
Generally this will be false/null, such is the default. When false/null a standard JMS message consumer will be created.