Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
public class CoreMessage extends RefCountMessage implements ICoreMessage {

public static final int BUFFER_HEADER_SPACE = PacketImpl.PACKET_HEADERS_SIZE;
public static final SimpleString OLD_QUEUE_PREFIX = new SimpleString("jms.queue.");
public static final SimpleString OLD_TOPIC_PREFIX = new SimpleString("jms.topic.");

private volatile int memoryEstimate = -1;

Expand Down Expand Up @@ -434,7 +436,7 @@ public CoreMessage setAddress(SimpleString address) {

@Override
public SimpleString getAddressSimpleString() {
return address;
return convertName(address);
}

@Override
Expand Down Expand Up @@ -1111,4 +1113,18 @@ private static String toDate(long timestamp) {
return new java.util.Date(timestamp).toString();
}
}

public SimpleString convertName(SimpleString name) {
if (name == null) {
return null;
}

if (name.startsWith(OLD_QUEUE_PREFIX)) {
return name.subSeq(OLD_QUEUE_PREFIX.length(), name.length());
} else if (name.startsWith(OLD_TOPIC_PREFIX)) {
return name.subSeq(OLD_TOPIC_PREFIX.length(), name.length());
} else {
return name;
}
}
}