Github user clebertsuconic commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2115#discussion_r191758985 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java --- @@ -606,22 +606,36 @@ public String getAddress() { @Override public AMQPMessage setAddress(String address) { - this.address = SimpleString.toSimpleString(address, coreMessageObjectPools == null ? null : coreMessageObjectPools.getAddressStringSimpleStringPool()); + internalSetAddress(address); + setProtonAddress(address); return this; } + private void internalSetAddress(String address) { + this.address = SimpleString.toSimpleString(address, coreMessageObjectPools == null ? null : coreMessageObjectPools.getAddressStringSimpleStringPool()); + } + @Override public AMQPMessage setAddress(SimpleString address) { this.address = address; + setProtonAddress(address.toString()); --- End diff -- this is used on expiry or DLQ. you could argue those are copied messages and new messages. We actually copy the message during the DLQ or Expiry transfer. I had the option to use extraProperties which only transverses through the broker... however there are implications on protocol conversions that could open further possibilities for bugs. this was the simpler change given it's copying the message. Notice that setAddress will not be effective unless the message is reencoded.. so it only works on Expiry or DLQ.
---