I'm in the process of making a consumer for rabbtMQ. I'm using python and after research i decided to use Kombu. With Kombu I already connected to a queue in rabbit and read the messages. The code is
queue = Queue('someQueue')
def process(body, message):
# Something
message.ack()
# connections
with Connection(hostname="localhost", userid="****", password="****", port=****, virtualhost="/") as conn:
# consume
with conn.Consumer(queue, callbacks=[process]) as consumer:
# Process messages and handle events on all channels
while True:
conn.drain_events()
It seems to work but I often see that Celery and Kombu are used together. I only need to consume the messages from the queue, is Kombu enough or should I integrate Celery as well. If so, does anyone has a good example, I found examples but they aren't clear to me. Also I want to make my queue durable=false but the consumer seems to have durable =true by default. How can I change this?
Thanks for any help!