Setup and Running Kombu consumers


  1. Install python 3.9 or greater on your system using pyenv
  2. Activate your project’s virtual environment for installing this library
$ source <virtualenv-path>/bin/activate
  1. Install consumer library by running
$ pip install kube_kombu

If you are using django you’ll need to setup the django project before running the consumer.

There are three variables that can be defined in your django settings file or in environment variables or as constants in your project:

  1. RABBITMQ: This will be a dictionary containing rabbitmq related variables

    "URL": "<RABBIT_URL>",
  1. HEALTHCHECK_HOST: Host on which the consumer thread will open a port fot liveness check
  2. HEALTHCHECK_PORT: Port which will be opened by consumer thread for liveness check


Sample scripts are written in the sample directory for defining and initializing the consumer file is for testing the socket connection locally

You should now be able to use tcp liveness probe in kubernetes for liveness check of the pod.


View Github