When testing VirtualTopic mapping behavior we noticed the following unexpected behavior behavior.
If we configure a virtualTopicConsumerWildcards parameter (example: virtualTopicConsumerWildcards=Consumer.*.%3E%3B2) on the acceptor and start an OpenWire VirtualTopic consumer on address Consumer.0.VirtualTopic.TEST.1 without statically configuring any address in the configuration, we get the expected multicast address structure:
multicast queue: Consumer.0.VirtualTopic.TEST.1
This behavior is expected.
However, if we then remove the virtualTopicConsumerWildcards parameter from the acceptor and restart the broker without deleting the journal directory or changing the client configuration, we see a new address named Consumer.0.VirtualTopic.TEST.1 (which we think is expected), but the consumers reattach to the previous multicast queue (which I think would be unexpected). This happens even if the consumers are restarted.
If we clean the data directory or remove the original multicast address and start the consumer (without the wildcard parameter on the acceptor), we get the expected address structure created:
anycast queue: Consumer.0.VirtualTopic.TEST.1
The broker should throw an exception or otherwise fail when an attempt is made to create / connect to an address that collides with an existing address.