Skip to content

Feature Request: Make setting of Mosquitto bridge flags “No Local” and “Retain as Published” configurable #3714

Description

@dabgmx

Problem Statement

Currently the Mosquitto bridge sets the flags “No Local” and “Retain as Published” to true in MQTT 5.0 when subscribing from the remote MQTT 5.0 broker. This functionality is hard coded.
This causes issues because some brokers do not support these flags and drop the connection. A fallback to MQTT 3.1.1 is not a viable workaround in our case.

Change Request

Please make the use of these two flags configurable while keeping the behaviour backwards compatible.

Suggested Modifications

mosquitto.conf
Add two settings:

  • bridge_no_local (default true to be backwards compatible)
  • bridge_retain_as_published (default true to be backwards compatible)

src/conf.c

  • parse the two configurations above (if missing set to true to be backwards compatible)

src/bridge.c

  • Only set MQTT_SUB_OPT_NO_LOC if bridge_no_local is true
  • Only set MQTT_SUB_OPT_RETAIN_AS_PUBLISHED if bridge_retain_as_published is true

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: AvailableNo one has claimed responsibility for resolving this issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions