mqtt-tools / mqttwarn

A highly configurable MQTT message router, where the routing targets are notification plugins, primarily written in Python.
https://mqttwarn.readthedocs.io/
Eclipse Public License 2.0
955 stars 183 forks source link

Messages directed only to the first target when a format function is defined #690

Open gsaviane opened 8 months ago

gsaviane commented 8 months ago

The following configuration

[telegraf/raspberrypi/weather] format = openweathermap_format() targets = smtp:user, file:mqttwarnlog, log:info title = "Weather forecast"

Routes messages only to the first target (smtp), although the documentation states that all the targets should receive messages. If I change the order of the targets, like

[telegraf/raspberrypi/weather] format = openweathermap_format() targets = file:mqttwarnlog, smtp:user, log:info title = "Weather forecast"

Then the file target only would receive the messages.

amotl commented 6 months ago

Dear @gsaviane,

omg, thank you for reporting that flaw. Why don't we have a corresponding test case, and why didn't anyone else report this problem before? We will look into it on the next development iteration.

With kind regards, Andreas.

amotl commented 6 months ago

Does the problem just happen if, how you are describing it, »when a format function is defined«?