Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 430 Bytes

subscriber.rst

File metadata and controls

24 lines (16 loc) · 430 Bytes

Subscriber

Example:

from message_queue import AMQPAdapter
from message_queue import Subscriber

def worker(channel, method, properties, body):
  print body

adapter = AMQPAdapter(host='0.0.0.0')
subscriber = Subscriber(adapter)

subscriber.consume(worker)

message_queue.subscriber