I found the answer, however I'm going to make a feature request on github, who knows, it might appear in future versions.
https://www.traccar.org/forums/topic/mqtt-updates-are-not-frequent-as-http-url/
Why do you need a feature request? The answer is that you can forward both positions and events. The thread you found is outdated.
Thanks for answering.
Great news, so should I have the following entries?
<entry key='event.forward.type'>mqtt</entry>
<entry key='event.forward.url'>mqtt://XXXXXXXX@XXXXXXXXX:1883</entry>
<entry key='event.forward.topic'>traccar/events</entry>
<entry key='positions.forward.type'>mqtt</entry>
<entry key='positions.forward.url'>mqtt://XXXXXXXXXX@XXXXXXX:1883</entry>
<entry key='positions.forward.topic'>traccar/positions</entry>
No, you need to check the official documentation:
I had visited the documentation before, but there is nothing there related to MQTT.
There's nothing about MQTT, but you will find position forwarding configuration keys there.
I tried the configurations in different ways, but only events arrive at the broker, with these configurations:
<entry key='event.forward.type'>mqtt</entry>
<entry key='event.forward.url'>mqtt://XXXXXXXX@XXXXXXXXX:1883</entry>
<entry key='event.forward.topic'>traccar/events</entry>
I tried:
<entry key='forward.type'>mqtt</entry>
<entry key='forward.url'>mqtt://XXXXXXXX@XXXXXXXXX:1883</entry>
<entry key='forward.topic'>positions</entry>
<entry key='forward.type'>url</entry>
<entry key='forward.url'>mqtt://XXXXXXXX@XXXXXXXXX:1883</entry>
<entry key='forward.topic'>positions</entry>
But without success.
The first version looks correct. Make sure you're using the latest version of Traccar.
Do you mean this version?
<entry key='forward.type'>mqtt</entry>
<entry key='forward.url'>mqtt://XXXXXXXX@XXXXXXXXX:1883</entry>
<entry key='forward.topic'>positions</entry>
Yes.
I can't find what could be wrong.
nothing appears in the log.
And the broker only shows the name of the topic (positions)
Good morning Anto!
I found the problem, the problem is in this commit:
https://github.com/traccar/traccar/commit/b8ae04d5435fda76646da139fb0b74068c60caf7
As I had downloaded the sources on the day you released version 6.2, this fix was not yet available. So I made the change and rebuilt. Now it's working perfectly.
Hello everyone, can anyone tell me if there is a way for the traccar server to report all data received from a device via mqtt? I integrated with my mqtt broker, but only events are reported.
I appreciate any information.