Skip to content
/ flopsy Public
forked from nathanborror/flopsy

A very simple way to interact with python AMQPlib.

License

Notifications You must be signed in to change notification settings

killian/flopsy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flopsy
======

A very simple way to interact with python AMQPlib. For my case I'm using
RabbitMQ as my implementation but it should work with others.

settings.py
-----------

AMQP_SERVER = '24.143.38.241'
AMQP_PORT = 5672
AMQP_USER = 'guest'
AMQP_PASSWORD = 'guest'
AMQP_VHOST = '/'

Consumer
--------

>>> import flopsy
>>> consumer = flopsy.Consumer()
>>> def message_callback(message):
...     print 'Recieved: ' + message.body
...     consumer.channel.basic_ack(message.delivery_tag)
...
>>> consumer.register('message_to_print', message_callback)
>>> consumer.wait()


Publisher
---------

>>> import flopsy
>>> publisher = flopsy.Publisher()
>>> publisher.publish('messages_to_print', 'Test message!')

About

A very simple way to interact with python AMQPlib.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%