1. Home
  2. Backhaul


Backhaul handles all data that should be published to Pulsar.

Currently, there are multiple components that make up it up:

  1. Backhaul.py - This python import will attach three information that passes through Backhaul, such as: UploadedUTCDateTime, UploadedLocalDateTime, and DeviceID. The data will then be queued to publicQueue.
  2. socketWorkerCB.py - This consumes messages from the queue, first come first serve. The message will then be sent to Pulsar. It will also queue data to websocketQueue and UDPQueue if such features are enabled.
  3. rabbitServe.py - This script listens and receives HTTP requests requesting their data to be sent via Backhaul. Used by services that cannot import Backhaul.py, such as Raspicam and Magic Mirror apps.
  4. backhaulListener.py - When run, it listens for topics from Pulsar. It will always listen for its own topics. For example, if a counter's serial is abc, then it will only listen to ffc-configuration-abc.


RabbitMQ is a software that implements Advanced Messaging Queue Processing. Backhaul at its core uses this, so if RMQ fails, then Backhaul fails too.


The following commands can be executed if necessary.

  • sudo rabbitmqctl restart
  • sudo rabbitmqctl stop_app
  • sudo rabbitmqctl start_app
  • sudo rabbitmqctl reset - Resets the entire software to its original state, deleting existing queues.
  • sudo rabbitmqctl list_queues - Lists all queues that exist and state the number of messages in it.
  • sudo rabbitmqctl purge_queue queueName - Replace queueName. Deletes all messages inside this queue.


Windows Platform can use the same commands as Linux's, but they must be executed in command line using a bat file provided in RabbitMQ's sbin. Find it by:

  • In the Windows Start Bar, try searching 'sbin'.
  • Go to the folder where RabbitMQ is installed, and navigate to 'sbin'. Then open a command line there. Example Path: C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.3\sbin

If the erlang node is not running:

rabbitmq-server start -detached


Attaches necessary details such as :

  1. UploadedUTCDateTime
  2. UploadedLocalDateTime
  3. CameraSerial/JetsonSerial/DeviceID/ServerID

...to the data it has received. If any of these fields already have data, Backhaul.py will take the existing data as priority.

Furthermore, messages published through here are durable, meaning that messages will not disappear even after a restart. The following are the default settings:

  • Exchange: ""
  • Routing_Key: publicQueue
  • Properties: Basic Properties { Delivery_Mode = 2 #persistent messages }


A HTTP Server

Incredible adventures in your favorite Coin Master app https://coinmaster-daily.com are waiting for you! Collect daily prizes, bonuses, freespins and Free coins. Participate in events with friends.