mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@650766 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
18f9773326
commit
620b657216
|
@ -152,6 +152,7 @@ public class BrokerService implements Service {
|
|||
private boolean keepDurableSubsActive = true;
|
||||
private boolean useVirtualTopics = true;
|
||||
private boolean useMirroredQueues = false;
|
||||
private boolean useTempMirroredQueues=true;
|
||||
private BrokerId brokerId;
|
||||
private DestinationInterceptor[] destinationInterceptors;
|
||||
private ActiveMQDestination[] destinations;
|
||||
|
@ -1303,6 +1304,14 @@ public class BrokerService implements Service {
|
|||
int timeBeforePurgeTempDestinations) {
|
||||
this.timeBeforePurgeTempDestinations = timeBeforePurgeTempDestinations;
|
||||
}
|
||||
|
||||
public boolean isUseTempMirroredQueues() {
|
||||
return useTempMirroredQueues;
|
||||
}
|
||||
|
||||
public void setUseTempMirroredQueues(boolean useTempMirroredQueues) {
|
||||
this.useTempMirroredQueues = useTempMirroredQueues;
|
||||
}
|
||||
//
|
||||
// Implementation methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -1902,4 +1911,5 @@ public class BrokerService implements Service {
|
|||
public void setRegionBroker(Broker regionBroker) {
|
||||
this.regionBroker = regionBroker;
|
||||
}
|
||||
|
||||
}
|
|
@ -44,6 +44,7 @@ public class MirroredQueue implements DestinationInterceptor, BrokerServiceAware
|
|||
|
||||
public Destination intercept(final Destination destination) {
|
||||
if (destination.getActiveMQDestination().isQueue()) {
|
||||
if (!destination.getActiveMQDestination().isTemporary() || brokerService.isUseTempMirroredQueues()) {
|
||||
try {
|
||||
final Destination mirrorDestination = getMirrorDestination(destination);
|
||||
if (mirrorDestination != null) {
|
||||
|
@ -65,6 +66,7 @@ public class MirroredQueue implements DestinationInterceptor, BrokerServiceAware
|
|||
LOG.error("Failed to lookup the mirror destination for: " + destination + ". Reason: " + e, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
return destination;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue