public class JmsActivationSpecConfig
extends java.lang.Object
Typically used in combination with JmsMessageEndpointManager
,
but not tied to it.
JmsActivationSpecFactory
,
JmsMessageEndpointManager.setActivationSpecConfig(org.springframework.jms.listener.endpoint.JmsActivationSpecConfig)
,
ResourceAdapter.endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory, javax.resource.spi.ActivationSpec)
Constructor and Description |
---|
JmsActivationSpecConfig() |
Modifier and Type | Method and Description |
---|---|
int |
getAcknowledgeMode()
Return the JMS acknowledgement mode to use.
|
java.lang.String |
getClientId() |
java.lang.String |
getDestinationName() |
java.lang.String |
getDurableSubscriptionName() |
int |
getMaxConcurrency()
Return the maximum number of consumers/sessions to use.
|
MessageConverter |
getMessageConverter()
Return the
MessageConverter to use, if any. |
java.lang.String |
getMessageSelector() |
int |
getPrefetchSize()
Return the maximum number of messages to load into a session.
|
QosSettings |
getReplyQosSettings() |
java.lang.String |
getSubscriptionName() |
boolean |
isPubSubDomain() |
boolean |
isReplyPubSubDomain() |
boolean |
isSubscriptionDurable() |
boolean |
isSubscriptionShared() |
void |
setAcknowledgeMode(int acknowledgeMode)
Set the JMS acknowledgement mode to use.
|
void |
setAcknowledgeModeName(java.lang.String constantName)
Set the JMS acknowledgement mode by the name of the corresponding constant
in the JMS
Session interface, e.g. |
void |
setClientId(java.lang.String clientId) |
void |
setConcurrency(java.lang.String concurrency)
Specify concurrency limits via a "lower-upper" String, e.g.
|
void |
setDestinationName(java.lang.String destinationName) |
void |
setDurableSubscriptionName(java.lang.String durableSubscriptionName) |
void |
setMaxConcurrency(int maxConcurrency)
Specify the maximum number of consumers/sessions to use, effectively
controlling the number of concurrent invocations on the target listener.
|
void |
setMessageConverter(MessageConverter messageConverter)
Set the
MessageConverter strategy for converting JMS Messages. |
void |
setMessageSelector(java.lang.String messageSelector) |
void |
setPrefetchSize(int prefetchSize)
Specify the maximum number of messages to load into a session
(a kind of batch size).
|
void |
setPubSubDomain(boolean pubSubDomain) |
void |
setReplyPubSubDomain(boolean replyPubSubDomain) |
void |
setReplyQosSettings(QosSettings replyQosSettings) |
void |
setSubscriptionDurable(boolean subscriptionDurable) |
void |
setSubscriptionName(java.lang.String subscriptionName) |
void |
setSubscriptionShared(boolean subscriptionShared) |
public void setDestinationName(@Nullable java.lang.String destinationName)
@Nullable public java.lang.String getDestinationName()
public void setPubSubDomain(boolean pubSubDomain)
public boolean isPubSubDomain()
public void setReplyPubSubDomain(boolean replyPubSubDomain)
public boolean isReplyPubSubDomain()
public void setReplyQosSettings(@Nullable QosSettings replyQosSettings)
@Nullable public QosSettings getReplyQosSettings()
public void setSubscriptionDurable(boolean subscriptionDurable)
public boolean isSubscriptionDurable()
public void setSubscriptionShared(boolean subscriptionShared)
public boolean isSubscriptionShared()
public void setSubscriptionName(@Nullable java.lang.String subscriptionName)
@Nullable public java.lang.String getSubscriptionName()
public void setDurableSubscriptionName(@Nullable java.lang.String durableSubscriptionName)
@Nullable public java.lang.String getDurableSubscriptionName()
public void setClientId(@Nullable java.lang.String clientId)
@Nullable public java.lang.String getClientId()
public void setMessageSelector(@Nullable java.lang.String messageSelector)
@Nullable public java.lang.String getMessageSelector()
public void setAcknowledgeModeName(java.lang.String constantName)
Session
interface, e.g. "CLIENT_ACKNOWLEDGE".
Note that JCA resource adapters generally only support auto and dups-ok
(see Spring's StandardJmsActivationSpecFactory
). ActiveMQ also
supports "SESSION_TRANSACTED" in the form of RA-managed transactions
(automatically translated by Spring's DefaultJmsActivationSpecFactory
.
constantName
- the name of the Session
acknowledge mode constantSession.AUTO_ACKNOWLEDGE
,
Session.CLIENT_ACKNOWLEDGE
,
Session.DUPS_OK_ACKNOWLEDGE
,
Session.SESSION_TRANSACTED
,
StandardJmsActivationSpecFactory
,
DefaultJmsActivationSpecFactory
public void setAcknowledgeMode(int acknowledgeMode)
public int getAcknowledgeMode()
public void setConcurrency(java.lang.String concurrency)
JCA listener containers will always scale from zero to the given upper limit. A specified lower limit will effectively be ignored.
This property is primarily supported for configuration compatibility with
DefaultMessageListenerContainer
.
For this activation config, generally use setMaxConcurrency(int)
instead.
public void setMaxConcurrency(int maxConcurrency)
public int getMaxConcurrency()
public void setPrefetchSize(int prefetchSize)
public int getPrefetchSize()
public void setMessageConverter(@Nullable MessageConverter messageConverter)
MessageConverter
strategy for converting JMS Messages.messageConverter
- the message converter to use@Nullable public MessageConverter getMessageConverter()
MessageConverter
to use, if any.