Coding Challenges

Objective

The challenges here are all connected — they collectively aim to build a simple project that highlights a real use-case for LavinMQ: leveraging it for async communication between the services in a distributed architecture.

Overview

Ultimately, we build a working but basic notification system — it is not useful, but serves the purpose of illustrating how LavinMQ can be used in a scenario like that. The system will notify people of new events happening in the Slack channels they belong to.

The image below gives a high-level overview of the architecture of our notification system. Notification system

As shown in the image above, our notification system will have the following components:

  • A producer — that captures events from three Slack channels and publishes them to their respective queues.
  • A LavinMQ server — with three queues, one per Slack channel
  • Three Consumers — Each consumer is mapped to a queue and by extension a Slack channel

Challenge 1: Creating the producer and consumer

  • Learn the basics of message queueing with LavinMQ.
  • Create a producer that sends messages to LavinMQ and a consumer that receives messages from LavinMQ — think of this as the “hello world” of messaging.

Challenge 2: Creating queues, exchanges and bindings

  • Learn about exchanges, bindings and routing keys in LavinMQ — building on the concepts I've learnt in the previous challenge.
  • Modify the producer you created in the previous challenge to fit the requirements of the notification system.

Challenge 3: Running three consumers

  • Learn how to create a 1-to-1 mapping between queues and consumers.
  • Modify the consumer I created in the first challenge to fit the requirements of the notification system.

Built With

Share this project:

Updates