Creating a RabbitMQ Consumer for the Houses App

Learn how to create a RabbitMQ consumer in Django.

Creating a consumer for the Config and Houses apps

In RabbitMQ, the word consumer refers to any application or program that receives messages. Therefore, consuming means receiving.

To create a RabbitMQ consumer for the Config and Houses app, we'll create a file in the backendservice1 app directory named consumer.py. Then, we open the file and import os, django, pika, and json, as follows:

Get hands-on with 1200+ tech skills courses.