python - Want to make a consumer, not sure if kombu is enough or I need to also implement Celery -
i'm in process of making consumer rabbtmq. i'm using python , after research decided use kombu. kombu connected queue in rabbit , read messages. code
queue = queue('somequeue') def process(body, message): # message.ack() # connections connection(hostname="localhost", userid="****", password="****", port=****, virtualhost="/") conn: # consume conn.consumer(queue, callbacks=[process]) consumer: # process messages , handle events on channels while true: conn.drain_events()
it seems work see celery , kombu used together. need consume messages queue, kombu enough or should integrate celery well. if so, has example, found examples aren't clear me. want make queue durable=false consumer seems have durable =true default. how can change this?
thanks help!
Comments
Post a Comment