While the core rabbitpy API strives to provide an easy to use, Pythonic interface for RabbitMQ, some developers may prefer a less opinionated AMQP interface. The :pyrabbitpy.AMQP
adapter provides a more traditional AMQP client library API seen in libraries like pika.
0.26
The following example will connect to RabbitMQ and use the :pyrabbitpy.AMQP
adapter to consume and acknowledge messages.
import rabbitpy
with rabbitpy.Connection() as conn:
with conn.channel() as channel:
amqp = rabbitpy.AMQP(channel)
for message in amqp.basic_consume('queue-name'):
print(message)
rabbitpy.AMQP