cortex.mq package

Submodules

cortex.mq.mq module

class cortex.mq.mq.MQer(url)

Bases: object

connect_to_consume_function(queue_name, callback_function, auto_ack=True)
create_exchange(exchange, exchange_type)
create_queue(queue_name, exc=True)
publish(exchange, key, body)
start_consuming()
subscribe_to_exchange(exchange_name, queue_name='', return_queue=False)
class cortex.mq.mq.RabbitDriver(host, port)

Bases: object

This is our supported MQ, rabbit MQ driver. the way this infrastructure works is similiar to readers. drivers have to implement: create_exchange, publish, consume etc… chose relatively general names, for potential logic in MQer

connect_to_function(q_name, callback_func, auto_ackk)
create_exchange(exchange_name, exchange_t)
create_queue(q_name, exclussive)
publish(ex, key, bod)
should_return(function)

this function implies wether we should return a value or not in this specific mq implementation this is used when two different MQ operations are related to one another like subscribe_to_change and start_consuming

start_consuming()
subscribe_to_exchange(exchange_name, q_name='')
cortex.mq.mq.find_mqdriver(furl_object)

Module contents