Hi Vera,
That's an interesting idea - and easily achieved with user-properties.
I've just pushed a version to the develop branch which just limits topic to a maximum count, set to 10 by default.
Options max_topic_alias_broker and bridge_max_topic_alias are the ones to look at if you want to test it out.
Cheers,
Roger
Hi Roger,
Thanks for including this.
I compiled the develop branch (commit 5177dd4d) and had a test between two brokers (whether a bridge negotiates aliases). It was kind of hard to diagnose because neither broker writes debug messages about having negotiated topic aliases, but I used tcpdump to analyze the traffic, and in a chain of mosquitto_pub -> broker1 -> broker2, the topic name disappears after the first publish. The tcpdump was between broker1 and broker2.
However, how is 'max_topic_alias_broker' supposed to work (so for normal subscribers)? When I start a local broker and subscribe with debug:
./mosquitto_sub -d -V mqttv5 -d -t '#' -i subber [--property publish topic-alias 10]
I see:
Client subber received PUBLISH (d0, q0, r0, m0, 'P/fc6947c40ffb/out/bla/long/longlong/long/long', ... (45 bytes))
[Thu 2021-May-27 15:24:06 CEST first publish]
Client subber received PUBLISH (d0, q0, r0, m0, 'P/fc6947c40ffb/out/bla/long/longlong/long/long', ... (46 bytes))
[Thu 2021-May-27 15:24:08 CEST second publish]
Do I misunderstand how 'max_topic_alias_broker' is supposed to work?
And when all this works as expected, is it perhaps known already which version of Mosquitto will include this feature?
Regards,
Wiebe