Forwarding to RabbitMQ

mhzatworka year ago

Hey traccar community,

I have been trying to forward events and positions to a RabbitMQ instance, I found the configuration on traccar docs.
I couldn't configure it. Below is what I have tried so far.

    <entry key='forward.enable'>true</entry>
    <entry key='forward.url'>amqp://user:pass@srv-rabbitmq:5672</entry>
    <entry key='rabbit.url'>amqp://user:pass@srv-rabbitmq:5672</entry>
    <entry key='forward.retry.enable'>true</entry>
    <entry key='forward.retry.delay'>50</entry>
    <entry key='forward.exchange'>routing</entry>
    <entry key='forward.topic'>traccar</entry>

Any sample or idea to get me going ?

Anton Tananaeva year ago

Please link to the doc where you found this.

Maykona year ago

Hello,

I configured it this way, and it worked correctly:

    <entry key='forward.enable'>true</entry>
    <entry key='forward.type'>amqp</entry>
    <entry key='forward.url'>amqp://user:password@rabbitmq-address:port</entry>
    <entry key='forward.retry.enable'>true</entry>
    <entry key='forward.retry.delay'>50</entry>
    <entry key='forward.exchange'>exchange_name</entry>
    <entry key='forward.topic'>topic_name</entry>
    
    <entry key='event.forward.enable'>true</entry>
    <entry key='event.forward.type'>amqp</entry>
    <entry key='event.forward.url'>amqp://user:password@rabbitmq-address:port</entry>
    <entry key='event.forward.retry.enable'>true</entry>
    <entry key='event.forward.retry.delay'>50</entry>
    <entry key='event.forward.exchange'>exchange_name</entry>
    <entry key='event.forward.topic'>topic_name</entry>
mhzatworka year ago

Still not working for me!
Which version of traccar are you using?

mhzatworka year ago

Actually I couldn't find any working example/doc.
I have used Traccar Configuration and a closed issue on Github.

Maykona year ago

Currently, I am using the latest version available on DockerHub (5.12) and RabbitMQ version 3.8.21.

You configure RabbitMQ Topic to connect with Queue?
Did you check the logs?