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 void
create(Broker broker, ConnectionContext context, ActiveMQDestination destination)
protected Destination
getMirrorDestination(Destination destination)
protected ActiveMQDestination
getMirrorTopic(ActiveMQDestination original)
String
getPostfix()
String
getPrefix()
Destination
intercept(Destination destination)
boolean
isCopyMessage()
void
remove(Destination destination)
void
setBrokerService(BrokerService brokerService)
void
setCopyMessage(boolean copyMessage)
Sets whether a copy of the message will be sent to each destination.void
setPostfix(String postfix)
Sets any postix used to identify the queue consumersvoid
setPrefix(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:
intercept
in interfaceDestinationInterceptor
-
remove
public void remove(Destination destination)
- Specified by:
remove
in interfaceDestinationInterceptor
-
create
public void create(Broker broker, ConnectionContext context, ActiveMQDestination destination)
- Specified by:
create
in 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:
setBrokerService
in interfaceBrokerServiceAware
-
getMirrorDestination
protected Destination getMirrorDestination(Destination destination) throws Exception
- Throws:
Exception
-
getMirrorTopic
protected ActiveMQDestination getMirrorTopic(ActiveMQDestination original)
-
-