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) {
return new DestinationFilter(destination) {
public void send(ProducerBrokerExchange context, Message message) throws Exception {
message.setDestination(mirrorDestination.getActiveMQDestination());
mirrorDestination.send(context, message);
if (isCopyMessage()) {
message = message.copy();
}
message.setDestination(destination.getActiveMQDestination());