The Pika API

In this section, we'll cover the various knobs, settings, and API surface area that Pika exposes to you. The programmer Pika is a python implementation of the AMQP 0-9-1 protocol that tries to stay fairly independent of the underlying network support library. Pika doesn't require threads. It takes care of to forbidding them either. The same goes for greenlets, callbacks, continuations, and generators. Pika is available for download via PyPI and can be installed using easy_install or pip:

pip install pika

You can also use this:

easy_installpika

Connecting

There are two ways to set up a connection with Pika. One is to explicitly specify the kind of options you want and expect RabbitMQ to respect as part of a ConnectionParameters object, ...

Get Mastering RabbitMQ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.