MQTT updates are not frequent as HTTP url forward

alexsahkaa year ago

What is wrong with MQTT forward config?

Forwarding to HTTP with no problem, but MQTT skipping a lot of events and positions.
Here are my two configs HTTP and MQTT

Thank you.

<!-- position forwarding -->
<entry key='forward.enable'>true</entry>
<entry key='forward.type'>json</entry>
<entry key='forward.url'>http://IP/traccar/api</entry>
<entry key='event.forward.enable'>true</entry>
<entry key='event.forward.url'>http://IP/traccar/api</entry>
<!-- MQTT forwarding -->
<entry key='event.forward.type'>mqtt</entry>
<entry key='event.forward.url'>mqtt://user:pass@IP:1883</entry>
<entry key='event.forward.topic'>traccar/events</entry>
Anton Tananaeva year ago

You don't have any position forwarding with MQTT.

As for events, if some are missing, there's probably an error. Check logs.

alexsahkaa year ago

Anton, is this is correct MQTT config?
Thank you.

<!-- MQTT forwarding -->
<entry key='forward.enable'>true</entry>
<entry key='forward.type'>mqtt</entry>
<entry key='event.forward.type'>mqtt</entry>
<entry key='event.forward.url'>mqtt://user:pass@IP:1883</entry>
<entry key='event.forward.topic'>traccar/events</entry>
Anton Tananaeva year ago

We only support MQTT for events currently.

alexsahkaa year ago

I don't know about events only, here is the config for MQTT and locations there are the MQTT values with locations, see the pic attached.
The problem with MQTT compared to HTTP is not always updated and skips a lot of events and positions.

Here is the config for MQTT

Here is the MQTT value

Anton Tananaeva year ago

Do you have an example of an event that was skipped?

alexsahkaa year ago

No, I do not have the example, but in general, I can see messages in HTTP but a very reduced quantity of messages in MQTT when GPS devices are moving.

Anton Tananaeva year ago

Do you understand the difference between positions and events?

alexsahkaa year ago

Yes, I understand the difference. But why then did the MQTT message contain locations?

Anton Tananaeva year ago

Because when forwarding events we also include positions where those events happened, but that's not all positions. That's absolutely expected that you won't receive all positions with events forwarding.

alexsahkaa year ago

I see, understand now. Thanks.