BesLogic / releaf-genparker

MIT License
5 stars 1 forks source link

Introduce communication with kafka from GenParker server #5

Closed andy2great closed 3 months ago

andy2great commented 3 months ago

Within the genparker backend platform application (backend), there are three kafka topics that needs to be used to send messages from genparker kafka to anywhere else. Explore the code and notice the comments placed to support kafka. For each topics a message must be properly structured:

We got the following topics: Logs The error message sent by the module.

key:
"{mac}~{key}"

value:
{
  "message": "string",
  "log": number // the type of log
}

Module The module that has been created with all it's details.

key:
"{mac}~{key}"

value:
{
  "treeAmount": 0,
  "treeType": 0
}

Data The sensor data being sent over time.

key:
"{mac}~{key}"

value: 
{
  val: x.val,
  sensor: x.senseur,
  position: x.position,
}