org.apache.activemq.broker.region.policy
Class IndividualDeadLetterStrategy

java.lang.Object
  extended by org.apache.activemq.broker.region.policy.AbstractDeadLetterStrategy
      extended by org.apache.activemq.broker.region.policy.IndividualDeadLetterStrategy
All Implemented Interfaces:
DeadLetterStrategy

public class IndividualDeadLetterStrategy
extends AbstractDeadLetterStrategy

A DeadLetterStrategy where each destination has its own individual DLQ using the subject naming hierarchy.


Constructor Summary
IndividualDeadLetterStrategy()
           
 
Method Summary
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 messages
 void setQueueSuffix(String queueSuffix)
          Sets the suffix to use for all dead letter queues for queue messages
 void setTopicPrefix(String topicPrefix)
          Sets the prefix to use for all dead letter queues for topic messages
 void setTopicSuffix(String topicSuffix)
          Sets the suffix to use for all dead letter queues for topic messages
 void 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
isEnableAudit, isProcessExpired, isProcessNonPersistent, isSendToDeadLetterQueue, setEnableAudit, setProcessExpired, setProcessNonPersistent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndividualDeadLetterStrategy

public IndividualDeadLetterStrategy()
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)


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.