Git Product home page Git Product logo

pgo2-broker's Introduction

PGO2-Broker

Broker information for PGO2

Zie ook documenten in repository-root

topics:

  • /votes (Qos1)
  • /music (QoS2)

⚠ Indien je op een verkeerd topic pub/sub doet of met verkeerde credentials zal je vaak geen foutmelding krijgen. De berichten worden echter NIET verstuurd/ontvangen.
Gebruik de mosquitto_sub en mosquitto_sub tools om te testen (beschikbaar op server A)

Payload

Payload is op zich niet belangrijk voor de broker, maar we definiëren hier toch het gebruikte formaat. We gebruiken JSON met volgende velden.

Music

  • title: string
  • artist: string
  • year: integer
  • songid: integer

Votes

  • timestamp: ISO 8601 date & time (String)
  • value: integer
    • Up = 1
    • Down = -1
  • username: string
  • id: String (UUID)
  • songid: integer

Voorbeeld

/votes

{
"timestamp": "2018-10-18T14:28:53Z",
"value": 1,
"username": "imre",
"uid": "550e8400-e29b-41d4-a716-446655440000",
"songid": 125
}

/music

{
"title" : "What is Love",
"artist" : "Haddaway",
"year" : 1993,
"songid" : 125
}

Topic authentication

Vraag user en paswoord aan Imre

MQTT to Mongo

Is een Node JS script dat de MQTT berichten in de MongoDB plaatst.
Configuratie staat in config.js
Uitvoeren met node server.js
Wordt als deamon uitgevoerd via PM2-framework.

pgo2-broker's People

Contributors

iliessens avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.