Closed endianjoakim closed 3 years ago
If your mountpoint is "", that is a valid topic as well. You may find that it's not interpreting "" as an empty string but literally as "", which would publish to ""/topic
Well that's the issue. The forward_mountpoint
is a prefix for the topics you set in forwards
, which means that they should mean the same thing. As I explained, when it's commented out, the topics in forwards
are correctly transmitted but not when it's set to "".
Edit: I see I misinterpreted you.
The problem then is that the configuration file does not allow bridge.mqtt.aws.forward_mountpoint =
. Thats a parsing error. Same with setting empty environment variables.
I think there is a work around for this in 4.3.0
, where you can create a new config directly from environment variables, https://github.com/emqx/emqx/issues/4424#issuecomment-805562578.
Closing.
We hit an issue where if we configure the
forward_mount
using environment variables, we can only set the value. We can not remove it completely. This is a known issue, https://github.com/emqx/emqx-docker/issues/77. However, we did not expect the different behaviour in setting an emptyforward_mount
vs commenting the line out of the config file.The base of the problem is that we can not have a default configuration file mounted in Kubernetes AND use environment variables to override some values, because kubernetes mounts the config as read-only. We need to use the default
emqx_bridge_mqtt.conf
and override the values. But then you can't comment out settings, and the default value forforward_mountpoint
does not work for our use case.