/rabbitmq-examples

RabbitMQ examples with PHP and Python

RabbitMQ examples

An example which demonstrates Consumer(server)/Publisher(client) integration to RabbitMQ

Prerequisites

Contents

  • consumer/consumer.py : A simple consumer, which listens RabbitMQ messages and simulates a mail queue
  • publisher/publisher.py : A simple consumer, which listens RabbitMQ messages and simulates a mail queue
  • publisher/publisher.php : A simple consumer, which listens RabbitMQ messages and simulates a mail queue

How to run

Ensure that you installed and started RabbitMQ server, py-amqplib, simplejson and php-amqplib

First you need to run your consumer which will simulate a mail sender

cd consumer && python consumer.py

After then you can send messages with one your publisher

cd publisher && python publisher.py
cd publisher && php publisher.php or run this PHP code from your web server