Skip to content

jlapeyre/pika-asynchronous-consumer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Asynchronous pika consumer

Description

This class implements an asynchronous RabbitMQ consumer. It is based on the pika example with modifications for general use. For instance, this modified class can be used to insert the messages in a database, or otherwise process them.

Pika is a pure-Python implementation of the AMQP 0-9-1 protocol including RabbitMQ's extensions.

Features added

  • Accept a callback for processing messages. The original writes messages to a log file.

  • Handle and logs error in connecting to the publisher.

  • Log the number of messages read and the number of messages for which processing failed.

  • Add class member data fields to select

    • the name of the queue.
    • whether to acknowledge receipt.
    • closing the connection after reading a given number of messages.

Files

Notes

All changes to the original example of an asynchronous consumer are marked with a comment and two exclamation points !!.

About

asynchronous RabbitMQ consumer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages