@ComponentProfile(summary="Place message on a JMS queue or topic", tag="producer,jms", recommended=JmsConnection.class) public class JmsProducer extends JmsProducerImpl
This differs from the standard PtpProducer
and PasProducer
in that it supports a
destination that is specified in RFC6167 style. For instance jms:queue:myQueueName
will
produce to a queue called myQueueName
and jms:topic:myTopicName
to 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. The standard deliveryMode, timeToLive, priority, replyToName properties are supported. If not specified, then they will be inherited from the producers configuration. For instance you could have the following destinations:
As the RFC6167 string can specify priority, timeToLive and deliveryMode; this producer defaults
JmsProducerImpl.getPerMessageProperties()
to be true.
In the adapter configuration file this class is aliased as jms-producer which is the preferred alternative to the fully qualified classname when building your configuration.
producerSession
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
JmsProducer() |
JmsProducer(ProduceDestination d) |
Modifier and Type | Method and Description |
---|---|
protected AdaptrisMessage |
doRequest(AdaptrisMessage msg,
ProduceDestination dest,
long timeout)
Actually do the request.
|
protected boolean |
perMessageProperties() |
protected void |
produce(AdaptrisMessage msg,
JmsDestination jmsDest) |
void |
produce(AdaptrisMessage msg,
ProduceDestination destination)
Produce the
AdaptrisMessage to the supplied ProduceDestination , over-riding any configured destinations. |
acknowledge, calculateDeliveryMode, calculatePriority, calculateTimeToLive, captureOutgoingMessageDetails, captureOutgoingMessageDetails, close, commit, configuredAcknowledgeMode, configuredCorrelationIdSource, configuredMessageListener, configuredMessageTranslator, createDestination, currentLogger, currentSession, defaultTimeout, getAcknowledgeMode, getCaptureOutgoingMessageDetails, getCorrelationIdSource, getDeliveryMode, getMessageTranslator, getPerMessageProperties, getPriority, getSessionFactory, getTtl, init, isManagedTransaction, logLinkedException, messagePriority, prepare, rollback, rollbackTimeout, setAcknowledgeMode, setCaptureOutgoingMessageDetails, setCorrelationIdSource, setDeliveryMode, setMessageTranslator, setPerMessageProperties, setPriority, setSessionFactory, setTtl, setupSession, start, stop, timeToLive, translate
getIgnoreReplyMetadata, produce, request, request, request, request, setIgnoreReplyMetadata, shouldIgnoreReplyMetadata
getDestination, 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 JmsProducer()
public JmsProducer(ProduceDestination d)
public void produce(AdaptrisMessage msg, ProduceDestination destination) throws ProduceException
AdaptrisMessageSender
AdaptrisMessage
to the supplied ProduceDestination
, over-riding any configured destinations.msg
- the AdaptrisMessage
to producedestination
- the ProduceDestination
to produce toProduceException
- wrapping any underlying ExceptionsAdaptrisMessageSender.produce(AdaptrisMessage, ProduceDestination)
protected void produce(AdaptrisMessage msg, JmsDestination jmsDest) throws javax.jms.JMSException, CoreException
javax.jms.JMSException
CoreException
protected AdaptrisMessage doRequest(AdaptrisMessage msg, ProduceDestination dest, long timeout) throws ProduceException
RequestReplyProducerImp
doRequest
in class RequestReplyProducerImp
ProduceException
#request(AdaptrisMessage,
ProduceDestination, long)
protected boolean perMessageProperties()
perMessageProperties
in class JmsProducerImpl