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

----- Original Message -----
> From: "Roger Light" <roger@xxxxxxxxxx>
> To: "Wiebe Cazemier" <wiebe@xxxxxxxxxxxx>
> Cc: "mosquitto-dev eclipse" <mosquitto-dev@xxxxxxxxxxx>
> Sent: Friday, 19 March, 2021 02:48:22
> Subject: Re: Topic aliasing on messages sent out by Mosquitto
>
> Hi Wiebe,
>
> I'd like to support broker initiated topic aliases. The question for me is how
> that should be designed and presented to the user to configure.
>
> There are a few ways I see it could work:
>
> * The broker admin has to explicitly configure every topic eligible for aliasing
> * The admin configures a wildcard topic filter and matching topics are aliased
> on a first come first serve basis
> * No config at all - topics aliased on a first come first serve basis
> * The broker analyses topic frequency for a while before deciding what to alias
> * Each of the above, plus only for topics over a certain length
>
> What have I missed? What do you all think?
>
> Regards,
>
> Roger

Hi,

There are two scenario's: the broker is acting like a bridge, or the broker is sending messages to a normal subscriber.

NORMAL SUBSCRIBER:

The aliases (and IDs) are per user, so if they connect with 'Topic Alias Maximum' > 0, I'd say to use them on a first-come/first serve basis. Setting this too low only affects the client's wishes. Reading the specs, it seems there is no way to unalias them, so an analysis will only describe the moment early on, but not later. The broker can't apply corrections if the frequent topics change.

ACTING AS BRIDGE:

Topic aliases (IDs) may run out quickly. This is especially the case when you're bridging two 'hubs'. But if you're using Mosquitto more like a client (like we do, run it on an embedded machine), it behaves more like a normal subscriber.

I think the match wildcard and topics for over a specific length are options here. For our use case a on/off flag is enough, because we know whether the broker is a 'hub' or just a client, but that may not be true for others.

Regards,

Wiebe


Back to the top