Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Topic aliasing on messages sent out by Mosquitto

The client can certainly request them, and you'll receive the full topic at least once, but aliasing isn't required, so the broker can continue sending the full topic and be completely compliant.

I support aliasing in my broker and it's neat, but I'm not sure it buys me a lot.  It just means both ends of a connection need to maintain a mapping that has to be resolved on each message.  A little more memory for a little less bandwidth.

On Thu, Mar 18, 2021, 03:07 Vera Clemens <mail@xxxxxxxxxxxxxxx> wrote:
Hi,

I believe I had the same feature request for Mosquitto a few months
ago, and I am also still interested in this. See my issue on GitHub
here: https://github.com/eclipse/mosquitto/issues/1757

The issue was recently closed by Roger. Maybe he could comment why.

Best regards

Vera

On Thu, 2021-03-18 at 10:33 +0100, Wiebe Cazemier via mosquitto-dev
wrote:
> Hi,
>
> (This is a resend of a mail sent on 2 June, 2020 16:40. It never got
> a reply, but I since then learned the list breaks DMARC and puts
> messages in spam. Also mailing Roger directly).
>
> I've been able to successfully use topic aliases with Mosquitto
> 1.6.8, but only when initiating it as a publisher. Apparently, as a
> subscriber, you can't request that a broker use aliases for messages
> that are sent out? I suppose that's not part of the standard? Is it
> doable/desirable to be able to configure Mosquitto to attempt to use
> aliases when subscribers connect with 'topic-alias-maximum' set?
>
> And what about bridges? We also use Mosquitto as client and it would
> be very beneficial if we could make all the topics aliased.
>
> Regards,
>
> Wiebe
>
>
> PS For illustration:
>
> If I publish, I can see the second message's 'null' topic:
>
>
> # ./mosquitto_pub -V mqttv5 -u wiebe -P "$wiebepass" -h 127.0.0.1 -p
> 18883 --insecure -t 'R/asdf/adsf/asdf/asdf/' --property publish
> topic-alias 1 -d -l
> Client (null) sending CONNECT
> Client auto-6E67EB4C-C338-E189-EA8A-2F199A0F265D received CONNACK
> (0)
> message one
> Client auto-6E67EB4C-C338-E189-EA8A-2F199A0F265D sending PUBLISH (d0,
> q0, r0, m1, 'R/asdf/adsf/asdf/asdf/', ... (11 bytes))
> message two
> Client auto-6E67EB4C-C338-E189-EA8A-2F199A0F265D sending PUBLISH (d0,
> q0, r0, m2, '(null)', ... (11 bytes))
>
>
> When I subscribe, I still see the topic:
>
>
> # ./mosquitto_sub -V mqttv5 -u wiebe -P "$wiebepass" -h 127.0.0.1 -p
> 18883 --insecure -t '#' -v -d --property connect topic-alias-maximum
> 10
> Client (null) sending CONNECT
> Client auto-18E5C5B9-9124-3D6C-CF1A-94A107AEF380 received CONNACK
> (0)
> Client auto-18E5C5B9-9124-3D6C-CF1A-94A107AEF380 sending SUBSCRIBE
> (Mid: 1, Topic: #, QoS: 0, Options: 0x00)
> Client auto-18E5C5B9-9124-3D6C-CF1A-94A107AEF380 received SUBACK
> Subscribed (mid: 1): 0
> Client auto-18E5C5B9-9124-3D6C-CF1A-94A107AEF380 received PUBLISH
> (d0, q0, r0, m0, 'R/asdf/adsf/asdf/asdf/', ... (11 bytes))
> R/asdf/adsf/asdf/asdf/ message one
> Client auto-18E5C5B9-9124-3D6C-CF1A-94A107AEF380 received PUBLISH
> (d0, q0, r0, m0, 'R/asdf/adsf/asdf/asdf/', ... (11 bytes))
> R/asdf/adsf/asdf/asdf/ message two
>
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/mosquitto-dev

_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/mosquitto-dev

Back to the top