Ad Widget

Collapse

Multi-part MQTT measurements

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vincemartinsmith
    Junior Member
    • Feb 2025
    • 4

    #1

    Multi-part MQTT measurements

    Hi folks,

    Further into the discovery of Zabbix and MQTT - I am hit with a problem where, in order to limit the max message size for any given transmission, some LoRaWAN devices send two separate messages with different metrics and need to aggregate these into a single "measurement/event" for processing.

    Previously I had an HTTP service which stored the first part in REDIS then when the second part arrived it would combine and forward on for processing. Now while experimenting with MQTT on Zabbix I'm finding a number of situations which aren't quite as straight forward

    Am wondering if there is any mechanism in Zabbix where we might 'catch' the first message, hold it in memory somewhere then when the second half arrives, then process it in one hit.


    Details:

    JSON message arrives in master item.
    one of two will turn up:

    ...
    "fPort":85,
    "object":{"chan1":"1.23, "chan2":"abc"}
    ...

    on the next transmission

    ...
    "fPort":85,
    "object":{"chan3":123, "chan4":101101}
    ...


    The application logic required chan1 and chan4 together to make decisions... but the dependent item for chan1 and chan2 go into error state when chan3 and chan4 payload arrives.

    Thoughts suggestions ?

    Cheers
    Vince
Working...