Importing topic twice with different prefixes

In my local mosquitto I have a bridge configured that imports the complete topic tree from a remote broker:

connection remote
topic # both 0 from-remote/ ""

Now I want to mirror one specific remote topic locally under a different prefix, so I tried:

connection remote
topic # both 0 from-remote/ ""
topic # in 0 remote-discovery/ discovery/

This doesn’t seem to work. If I publish on the remote broker to discovery/test the message will appear locally under from-remote/discovery/test but it will not appear under remote-discovery/test.

My guess is that every message has a unique identifier and it will never be imported twice?

Is there a way around that?

Topic remapping is handled for each topic in the order they are defined, and the first matching remapping is applied.

This should mean that if you swap the order the topics are defined it will put discovery/test under remote-discovery/test. It will not appear under from-remote/.

topic # in 0 remote-discovery/ discovery/
topic # both 0 from-remote/ ""

I hope this helps.

Regards,

Roger