Class MirroredQueue
- java.lang.Object
-
- org.apache.activemq.broker.region.virtual.MirroredQueue
-
- All Implemented Interfaces:
BrokerServiceAware,DestinationInterceptor
public class MirroredQueue extends Object implements DestinationInterceptor, BrokerServiceAware
Creates Mirrored Queue using a prefix and postfix to define the topic name on which to mirror the queue to.
-
-
Constructor Summary
Constructors Constructor Description MirroredQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate(Broker broker, ConnectionContext context, ActiveMQDestination destination)protected DestinationgetMirrorDestination(Destination destination)protected ActiveMQDestinationgetMirrorTopic(ActiveMQDestination original)StringgetPostfix()StringgetPrefix()Destinationintercept(Destination destination)booleanisCopyMessage()voidremove(Destination destination)voidsetBrokerService(BrokerService brokerService)voidsetCopyMessage(boolean copyMessage)Sets whether a copy of the message will be sent to each destination.voidsetPostfix(String postfix)Sets any postix used to identify the queue consumersvoidsetPrefix(String prefix)Sets the prefix wildcard used to identify the queue consumers for a given topic
-
-
-
Method Detail
-
intercept
public Destination intercept(Destination destination)
- Specified by:
interceptin interfaceDestinationInterceptor
-
remove
public void remove(Destination destination)
- Specified by:
removein interfaceDestinationInterceptor
-
create
public void create(Broker broker, ConnectionContext context, ActiveMQDestination destination)
- Specified by:
createin interfaceDestinationInterceptor
-
getPostfix
public String getPostfix()
-
setPostfix
public void setPostfix(String postfix)
Sets any postix used to identify the queue consumers
-
getPrefix
public String getPrefix()
-
setPrefix
public void setPrefix(String prefix)
Sets the prefix wildcard used to identify the queue consumers for a given topic
-
isCopyMessage
public boolean isCopyMessage()
-
setCopyMessage
public void setCopyMessage(boolean copyMessage)
Sets whether a copy of the message will be sent to each destination. Defaults to true so that the forward destination is set as the destination of the message
-
setBrokerService
public void setBrokerService(BrokerService brokerService)
- Specified by:
setBrokerServicein interfaceBrokerServiceAware
-
getMirrorDestination
protected Destination getMirrorDestination(Destination destination) throws Exception
- Throws:
Exception
-
getMirrorTopic
protected ActiveMQDestination getMirrorTopic(ActiveMQDestination original)
-
-