# Message Brokers

# System/Core Message Broker

The System or Core message broker is an instance of redis running on port 7480 that receives publishes from core components/peripherals.

You can subscribe to debug messages from core components using the monitor command.

redis-cli -p 7480 monitor

You can also subscribe to various channels using the following command

$ redis-cli -p 7480 subscribe channel

# Examples
$ redis-cli -p 7480 subscribe gps
$ redis-cli -p 7480 psubscribe onewire*

The channels that publish information to the message broker are separated by the peripheral, so you can go to the Connect page and find the peripheral you want along with the channels used to publish information for that specific peripheral.

1) "message"
2) "gps_speed_report"
3) "0.019,0.61,1618502866"
1) "message"
2) "gps"
3) "{\"time\":\"2021-04-15T16:07:47Z\",\"fix\":3,\"qlty\":2,\"hdop\":0.63,\"pdop\":1.25,\"vdop\":1.08,\"satused\":15,\"dec\":0.00,\"lat\":25.783675,\"lon\":-80.293561,\"alt\":12.207,\"speed\":0.167,\"track\":346.74,\"raw_point\":{\"lat\":25.783578,\"lon\":-80.293516,\"alt\":23.328,\"speed\":0.019,\"track\":205.74},\"processed\":2135899,\"errors\":889}"
1) "message"
2) "gps_speed_report"
3) "0.019,0.63,1618502867"
1) "message"
2) "gps_speed_report"
3) "0.019,0.61,1618502868"

Note that the core message broker does not allow writing to it, only reading data.

Refer to the SDK for the names of the channels you can subscribe to.

# Application Message Broker

The application message broker is a separate instance of redis that runs on the default port 6379 with full permissions for user syrus4g, allowing you to use this instance for your custom applications.

syrus4g@syrus-867698040012345:~$ redis-cli SET name "syrus4 redis"
syrus4g@syrus-867698040012345:~$ redis-cli GET name
"syrus4 redis"
Last Updated: 4/30/2021, 10:30:25 AM