Giter Club home page Giter Club logo

mqtt-empello-assignment's Introduction

mqtt-empello-assignment

Assignment based on MQTT for Empello, London (https://www.empello.com)

Question :

Create a simple "Hello World" MQTT PUB/SUB app.

  • Subscriber should listen to the topic /test
  • First publisher, with /test/hello sends "hello" every 1 second (feel free to use time.sleep(1))
  • Second publisher, with the /test/world sends "world" every 2 second.
  • Please use this package: paho-mqtt

For a no-setup broker, feel free to use the one at https://mosquitto.org

Create a docker file with a working Django setup. What do you need to do to make it production-ready?

Project Dependencies

Steps to run :

  1. Clone the project

    git clone https://github.com/KetanSingh11/mqtt-empello-assignment.git

  2. Open 2 tabs in linux terminal, and navigate to the project directory.

  3. In Tab #1 - run

    virtualenv venv

    source venv/bin/activate

    pip install -r requirements.txt

  4. In Tab #1 (subscriber) - run the command (the subscriber will start and wait for messages):

    python subscriber.py

  5. In Tab #2 (publisher) - run the below command in order:

    source venv/bin/activate

    chmod +x run.sh

    ./run.sh

  6. Messages will start showing up in the Tab #1.

By default the publisher sends 5 messages and then shutsdown. To change this, update the value of send_msg_count in the publisher.py file to a integer number.

mqtt-empello-assignment's People

Contributors

ketansingh11 avatar

Watchers

 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.