RabbitPlay

Abstraction on top of pika for working with RabbitMQ.


License
Other
Install
pip install RabbitPlay==0.7.1

Documentation

RabbitPlay

Abstraction on top of pika library for working with RabbitMQ.

Installation

  • Using pip:

    # master branch:
    pip install git+https://github.com/SwipeBank/rabbitplay.git#egg=rabbitplay
    # specific version (tag):
    pip install git+https://github.com/SwipeBank/rabbitplay.git@0.7#egg=rabbitplay-0.7
  • Manual installation:

    git clone https://github.com/SwipeBank/rabbitplay.git
    cd rabbitplay
    # git checkout 0.7
    python setup.py install

Examples

Examples are configured to use a default user user, password password and virtual host vhost.

Hint:
You can use Docker Compose to launch a RabbitMQ instance with required settings.

Consumer:

  • Command line:

    # hello_world_queue:
    python -m examples.receive
    # custom queue:
    python -m examples.receive 'my_queue'

Producer:

  • Custom queue \ message:

    python -m examples.send_message 'queue1' 'rabbit1.'
    python -m examples.send_message 'queue1' 'rabbit5.....'
    python -m examples.send_message 'message_to_default_queue'
  • Multiple messages \ queues:

    python -m examples.send_messages