In SpyTopicPublisher and SpyQueueSender, the publish/send methods assign a new messageID to the message, overwriting any existing message id. However, acknowledgement logic in AcknowledgementRequest.equals uses the messageID to compare messages. Hence, if a received message is republished into the message queue, it will never be removed from the unacknowledgedMessages list in BasicQueue, leading to memory leaks and other problems. The same behaviour will be seen if on receiving a message, a subscriber sets the JMS MessageID (which is not a common case, but is allowed by the implementation).
The AcknowledgementRequest.equals should probably use some other id on the message which will not change when a message is republished into the message queue. This will enable using the message bus seamlessly for setting up process/message flows.