Skip to content

Commit

Permalink
This closes #1087
Browse files Browse the repository at this point in the history
  • Loading branch information
clebertsuconic committed Mar 10, 2017
2 parents c40823e + 6b2363e commit 26f987b
Showing 1 changed file with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.apache.activemq.artemis.api.core.ActiveMQNonExistentQueueException;
import org.apache.activemq.artemis.api.core.Message;
import org.apache.activemq.artemis.api.core.Pair;
import org.apache.activemq.artemis.api.core.RoutingType;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.api.core.client.ClientSession;
import org.apache.activemq.artemis.api.core.management.CoreNotificationType;
Expand Down Expand Up @@ -69,9 +70,7 @@
import org.apache.activemq.artemis.core.server.Queue;
import org.apache.activemq.artemis.core.server.QueueQueryResult;
import org.apache.activemq.artemis.core.server.RoutingContext;
import org.apache.activemq.artemis.api.core.RoutingType;
import org.apache.activemq.artemis.core.server.ServerConsumer;

import org.apache.activemq.artemis.core.server.ServerSession;
import org.apache.activemq.artemis.core.server.TempQueueObserver;
import org.apache.activemq.artemis.core.server.management.ManagementService;
Expand Down Expand Up @@ -1311,14 +1310,7 @@ public RoutingStatus send(Transaction tx,
message.putStringProperty(Message.HDR_VALIDATED_USER, SimpleString.toSimpleString(validatedUser));
}

SimpleString originalAddress = message.getAddressSimpleString();

SimpleString address = removePrefix(message.getAddressSimpleString());

// In case the prefix was removed, we also need to update the message
if (address != message.getAddressSimpleString()) {
message.setAddress(address);
}
SimpleString address = message.getAddressSimpleString();

if (defaultAddress == null && address != null) {
defaultAddress = address;
Expand All @@ -1343,7 +1335,7 @@ public RoutingStatus send(Transaction tx,

handleManagementMessage(tx, message, direct);
} else {
result = doSend(tx, message, originalAddress, direct, noAutoCreateQueue);
result = doSend(tx, message, address, direct, noAutoCreateQueue);
}
return result;
}
Expand Down

0 comments on commit 26f987b

Please sign in to comment.