MQTT bridge + relational data processing error
# umh-support
a
I have created a bridge with default MQTT input config with processing in JS (also default). It has successfully connected to MQTT broker. I have published mqtt message:
Copy code
ia/raw/development/ioTSensors/Temperature
37.7
I expect the message to be added to uns but it failed and now it's spamming once per second with an error:
Copy code
level=error msg="Failed to send message to uns: umh_topic is not set or is empty in message 0, umh_topic is mandatory" @service=benthos label="" path=root.output
Version: v0.43.9 sidenote: with benthos processor it works well Please help to resolve
found here: https://docs.umh.app/benthos-umh/output/uns-output "topic is not set or is empty" – your pipeline never wrote msg.meta.umh_topic. Add a tag_processor (auto) or a Bloblang line: meta umh_topic = "umh.v1.demo.plant1.line1._historian.temperature" but here: https://docs.umh.app/benthos-umh/processing/node-red-javascript-processor none of the exmaple modifies msg.meta.umh_topic
ok, I added
umh_topic
explicit setting and the issue resolved
Copy code
msg.meta.umh_topic = "umh/v1/{{ .location_path }}" + tagName; //umh.v1.<location_path>.<data_contract>[.<virtual_path>].<name>
@jermuk i think it would be helpful to mention this in JS processor doc as well and also update the default JS processir boilerplate (to help onboarding for newbies like me :))
2 Views