Description
When using compositeTopics to copy messages from one destination to multiple queues or topics, and setting forwardOnly="false", messages sent out on the original topic will have the destination field set to the last forwarded topic/queue name. For example, using this config:
<compositeTopic name="original.topic" forwardOnly="false">
<forwardTo>
<queue physicalName="forwarded.queue" />
<topic physicalName="forwarded.topic" />
</forwardTo>
</compositeTopic>
Messages sent out on the original.topic topic will have "forwarded.topic" set as their destination.
My stomp client (activemessaging) uses the destination field to route messages locally after they are received, so this causes big problems for me.
I have attached a patch that fixes this behavior.