Class IndividualDeadLetterStrategy
- java.lang.Object
-
- org.apache.activemq.broker.region.policy.AbstractDeadLetterStrategy
-
- org.apache.activemq.broker.region.policy.IndividualDeadLetterStrategy
-
- All Implemented Interfaces:
DeadLetterStrategy
public class IndividualDeadLetterStrategy extends AbstractDeadLetterStrategy
ADeadLetterStrategy
where each destination has its own individual DLQ using the subject naming hierarchy.
-
-
Constructor Summary
Constructors Constructor Description IndividualDeadLetterStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ActiveMQDestination
createDestination(Message message, String prefix, String suffix, boolean useQueue, Subscription subscription)
ActiveMQDestination
getDeadLetterQueueFor(Message message, Subscription subscription)
Returns the dead letter queue for the given message and subscription.String
getQueuePrefix()
String
getQueueSuffix()
String
getTopicPrefix()
String
getTopicSuffix()
boolean
isDestinationPerDurableSubscriber()
boolean
isUseQueueForQueueMessages()
boolean
isUseQueueForTopicMessages()
void
setDestinationPerDurableSubscriber(boolean destinationPerDurableSubscriber)
sets whether durable topic subscriptions are to get individual dead letter destinations.void
setQueuePrefix(String queuePrefix)
Sets the prefix to use for all dead letter queues for queue messagesvoid
setQueueSuffix(String queueSuffix)
Sets the suffix to use for all dead letter queues for queue messagesvoid
setTopicPrefix(String topicPrefix)
Sets the prefix to use for all dead letter queues for topic messagesvoid
setTopicSuffix(String topicSuffix)
Sets the suffix to use for all dead letter queues for topic messagesvoid
setUseQueueForQueueMessages(boolean useQueueForQueueMessages)
Sets whether a queue or topic should be used for queue messages sent to a DLQ.void
setUseQueueForTopicMessages(boolean useQueueForTopicMessages)
Sets whether a queue or topic should be used for topic messages sent to a DLQ.-
Methods inherited from class org.apache.activemq.broker.region.policy.AbstractDeadLetterStrategy
getExpiration, getMaxAuditDepth, getMaxProducersToAudit, isEnableAudit, isProcessExpired, isProcessNonPersistent, isSendToDeadLetterQueue, rollback, setEnableAudit, setExpiration, setMaxAuditDepth, setMaxProducersToAudit, setProcessExpired, setProcessNonPersistent
-
-
-
-
Method Detail
-
getDeadLetterQueueFor
public ActiveMQDestination getDeadLetterQueueFor(Message message, Subscription subscription)
Description copied from interface:DeadLetterStrategy
Returns the dead letter queue for the given message and subscription.
-
getQueuePrefix
public String getQueuePrefix()
-
setQueuePrefix
public void setQueuePrefix(String queuePrefix)
Sets the prefix to use for all dead letter queues for queue messages
-
getTopicPrefix
public String getTopicPrefix()
-
setTopicPrefix
public void setTopicPrefix(String topicPrefix)
Sets the prefix to use for all dead letter queues for topic messages
-
getQueueSuffix
public String getQueueSuffix()
-
setQueueSuffix
public void setQueueSuffix(String queueSuffix)
Sets the suffix to use for all dead letter queues for queue messages
-
getTopicSuffix
public String getTopicSuffix()
-
setTopicSuffix
public void setTopicSuffix(String topicSuffix)
Sets the suffix to use for all dead letter queues for topic messages
-
isUseQueueForQueueMessages
public boolean isUseQueueForQueueMessages()
-
setUseQueueForQueueMessages
public void setUseQueueForQueueMessages(boolean useQueueForQueueMessages)
Sets whether a queue or topic should be used for queue messages sent to a DLQ. The default is to use a Queue
-
isUseQueueForTopicMessages
public boolean isUseQueueForTopicMessages()
-
setUseQueueForTopicMessages
public void setUseQueueForTopicMessages(boolean useQueueForTopicMessages)
Sets whether a queue or topic should be used for topic messages sent to a DLQ. The default is to use a Queue
-
isDestinationPerDurableSubscriber
public boolean isDestinationPerDurableSubscriber()
-
setDestinationPerDurableSubscriber
public void setDestinationPerDurableSubscriber(boolean destinationPerDurableSubscriber)
sets whether durable topic subscriptions are to get individual dead letter destinations. When true, the DLQ is of the form 'topicPrefix.clientId:subscriptionName' The default is false.- Parameters:
destinationPerDurableSubscriber
-
-
createDestination
protected ActiveMQDestination createDestination(Message message, String prefix, String suffix, boolean useQueue, Subscription subscription)
-
-