[ARTEMIS-2954]: RA doesn't use the RA specified prefix when setting up a destination.

* Fixing the fix for double prefix issue as the destiantion name wasn't
  appended when the old prefix wasn't present.

Issue: https://issues.apache.org/jira/browse/ARTEMIS-2954
This commit is contained in:
Emmanuel Hugonnet 2020-10-22 15:51:01 +02:00
parent 94451674fa
commit 6a2a611d3c
No known key found for this signature in database
GPG Key ID: 3DD1CCD4EDB2EE81
1 changed files with 4 additions and 4 deletions

View File

@ -597,12 +597,12 @@ public class ActiveMQActivation {
if (spec.getTopicPrefix() == null) {
if (spec.isEnable1xPrefixes() == null) {
if (ra.isEnable1xPrefixes() != null && ra.isEnable1xPrefixes() && !topic.startsWith(PacketImpl.OLD_TOPIC_PREFIX.toString())) {
return PacketImpl.OLD_TOPIC_PREFIX.toString();
return PacketImpl.OLD_TOPIC_PREFIX.toString() + topic;
}
return topic;
}
if (spec.isEnable1xPrefixes() && !topic.startsWith(PacketImpl.OLD_TOPIC_PREFIX.toString())) {
return PacketImpl.OLD_TOPIC_PREFIX.toString();
return PacketImpl.OLD_TOPIC_PREFIX.toString() + topic;
}
return topic;
}
@ -613,12 +613,12 @@ public class ActiveMQActivation {
if (spec.getQueuePrefix() == null) {
if (spec.isEnable1xPrefixes() == null) {
if (ra.isEnable1xPrefixes() != null && ra.isEnable1xPrefixes() && !queue.startsWith(PacketImpl.OLD_QUEUE_PREFIX.toString())) {
return PacketImpl.OLD_QUEUE_PREFIX.toString();
return PacketImpl.OLD_QUEUE_PREFIX.toString() + queue;
}
return queue;
}
if (spec.isEnable1xPrefixes() && !queue.startsWith(PacketImpl.OLD_QUEUE_PREFIX.toString())) {
return PacketImpl.OLD_QUEUE_PREFIX.toString();
return PacketImpl.OLD_QUEUE_PREFIX.toString() + queue;
}
return queue;
}