Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Bridge to AWS IoT and retain flag

I hear you and retain might as well be a critical feature for some applications. In my case it's a home automation environment in its early stages and maybe I come to a point where this becomes a non-negotiable requirement.

What I want to understand is whether there is a way to send messages with retain=off and where this is set. Say I have a device running Tasmota with MQTT enabled. In the Tasmota config I specify the MQTT broker (Mosquitto) and have a bridge configured (Mosquitto <--> AWS IoT). If I wanted to forward the state of a switch connected to the Tasmota device to the AWS IoT broker (via the bridge) is the setting for retain=off 1) in the Tasmota device (i.e. the client) or b) the local broker (i.e. Mosquitto)? I was hoping b) as I understand in a bridge configuration the Mosquitto MQTT broker becomes an MQTT client.

On Fri, Oct 23, 2020 at 4:35 PM Dustin Sallings <dustin@xxxxxxx> wrote:
retain is a rather important feature and if a client is expecting it to work, then disconnecting the client is going to be bad.

IMO, if a broker doesn't support retain, it's not worth trying to deal with it.  Both Google and AWS mqtt brokers provide such a small fraction of the features of MQTT that I found it better to just run my own mqtt broker in the cloud.

On Thu, Oct 22, 2020 at 9:29 PM Thomas Meier <tfmeier@xxxxxxxxx> wrote:
I'm trying to create an MQTT bridge from my Mosquitto broker running inside Home Assistant to the AWS IoT broker.

As far as I can tell the bridge is setup properly as I can test communication in both directions (followed this guide https://aws.amazon.com/blogs/iot/how-to-bridge-mosquitto-mqtt-broker-to-aws-iot/).

However it appears that MQTT messages sent from Home Assistant have retain=yes. Reading on AWS IoT I understand the retain flag is not supported and any client sending message with retain=yes get disconnected.

Assuming this is correct I need to find a way to globally disable retain on the Mosquitto end, right? Reading the mosquitto.conf man page the option retain_available [ true | false ] doesn't seem to help.

Is there a way to globally disable retain?

Thomas
_______________________________________________
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