Forwarding to RabbitMQ

mhzatwork10 months 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 Tananaev10 months ago

Please link to the doc where you found this.

Maykon10 months 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>
mhzatwork10 months ago

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

mhzatwork10 months ago

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

Maykon10 months 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?