message brokers, a brief walk-through

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • amqp

    Go client for AMQP 0.9.1

  • Basically this code, connects to our rabbitmQ using the streadway/amqp package which is the golang standard library for communicating with rabbitmQ, next we declare a unique channel to enable us pass across message to a specific queue. Then we call the Consume function which takes in a parameter of *amqp.Channel which is the channel we created previously.

  • MQ-dispatcher

    using rabbitmQ with go and Fastapi

  • So the Consume function basically reads all the messages currently available in the queue and serializes them to an alert variable, then it sends a tweet to a specified twitter account with the alert's message as the tweet's content, it also sends an email with the alert's topic as subject and the alert's message as the email's content to my email address. I'm obviously not gonna go into the details of how to programmatically create a tweet or send an email. But if you're interested in learning how to send Emails with golang, you should definitely take look at my article Sending E-mails with Go. All the sample codes written here are publicly available on this github repository with instructions to run them.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • pydantic

    Data validation using Python type hints

  • From the code above,on line one and two we imported the FastAPI class from fastapi and also the BaseModel class from pydantic we then instantiate the fastapi class with a variable called app on line 4, we will see the use of this app variable shortly.On line 8 we create an Alert class which is the schema of the json data our api expects, and within the class we declare two fields, topic which is the topic of the alert and message which is the alert's content. Notice how our alert class inherits the pydantic.BaseModel class.

  • fastapi

    FastAPI framework, high performance, easy to learn, fast to code, ready for production

  • As i mentioned earlier, the Api and publisher service is written with python's modern web api framework fastapi, it is quite easy to set up. First we need to set up our virtual environment, do this by running python -m venv you can activate your virtual environment on windows by running

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts