Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1787#discussion_r162261502 --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java --- @@ -736,11 +736,11 @@ public RoutingStatus route(final Message message, throw new IllegalStateException("Message cannot be routed more than once"); } - setPagingStore(message); + setPagingStore(context.getAddress(message), message); AtomicBoolean startedTX = new AtomicBoolean(false); - final SimpleString address = message.getAddressSimpleString(); + final SimpleString address = context.getAddress(message); --- End diff -- Can we not make the call to context.getAddress just the once, and re-use the result throughout the method call?
---