Questions tagged [pika]

Python-Pika is a pure-Python implementation of the AMQP 0-9-1 protocol that tries to stay fairly independent of the underlying network support library. Python-Pika was developed primarily for use with RabbitMQ, but should also work with other AMQP 0-9-1 brokers.

Python-Pika is a pure-Python implementation of the AMQP 0-9-1 protocol that tries to stay fairly independent of the underlying network support library. Python-Pika was developed primarily for use with RabbitMQ, but should also work with other AMQP 0-9-1 brokers.

672 questions
77
votes
7 answers

Handling long running tasks in pika / RabbitMQ

We're trying to set up a basic directed queue system where a producer will generate several tasks and one or more consumers will grab a task at a time, process it, and acknowledge the message. The problem is, the processing can take 10-20 minutes,…
jmacdonagh
  • 3,851
  • 3
  • 18
  • 14
53
votes
3 answers

How can I recover unacknowledged AMQP messages from other channels than my connection's own?

It seems the longer I keep my rabbitmq server running, the more trouble I have with unacknowledged messages. I would love to requeue them. In fact there seems to be an amqp command to do this, but it only applies to the channel that your connection…
Will Olbrys
  • 957
  • 2
  • 9
  • 13
51
votes
6 answers

How to create a delayed queue in RabbitMQ?

What is the easiest way to create a delay (or parking) queue with Python, Pika and RabbitMQ? I have seen an similar questions, but none for Python. I find this an useful idea when designing applications, as it allows us to throttle messages that…
eandersson
  • 25,781
  • 8
  • 89
  • 110
44
votes
3 answers

Consume multiple queues in python / pika

I am trying to create a consumer that would subscribe to multiple queues, and then process messages as they arrive. The problem is that when there is some data already present in the first queue, it consumes the first queue and never goes to…
user3295878
  • 831
  • 1
  • 6
  • 19
39
votes
2 answers

Which form of connection to use with pika

I've been trying to figure out which form of connection i should use when using pika, I've got two alternatives as far as I understand. Either the BlockingConnection or the SelectConnection, however I'm not really sure about the differences between…
Daniel Figueroa
  • 10,348
  • 5
  • 44
  • 66
29
votes
1 answer

Can anyone please tell me what are the differences between pika and kombu messaging library in python?

I want to use messaging library in my application to interact with rabbitmq. Can anyone please explain the differences between pika and kombu library?
Nitesh Singh Rajput
  • 607
  • 1
  • 7
  • 24
26
votes
7 answers

Error "unknown delivery tag" occurs when i try ack messages to RabbitMQ using pika (python)

I want process messages in few threads but i'm getting error during execute this code: from __future__ import with_statement import pika import sys from pika.adapters.blocking_connection import BlockingConnection from pika import connection,…
solo117
  • 1,069
  • 2
  • 11
  • 12
26
votes
2 answers

RabbitMQ: What Does Celery Offer That Pika Doesn't?

I've been working on getting some distributed tasks working via RabbitMQ. I spent some time trying to get Celery to do what I wanted and couldn't make it work. Then I tried using Pika and things just worked, flawlessly, and within minutes. Is there…
Jason Champion
  • 2,670
  • 4
  • 35
  • 55
21
votes
2 answers

How to reconnect to RabbitMQ?

My python script constantly has to send messages to RabbitMQ once it receives one from another data source. The frequency in which the python script sends them can vary, say, 1 minute - 30 minutes. Here's how I establish a connection to RabbitMQ: …
Alan Coromano
  • 24,958
  • 53
  • 135
  • 205
21
votes
1 answer

RabbitMQ change queue parameters on a production system

I'm using RabbitMQ as a message queue in a service-oriented architecture, where many separate web services publish messages bound for RabbitMQ queues. Those queues are in turn subscribed to by various consumers, which perform background work; a…
DevinR
  • 383
  • 2
  • 3
  • 10
21
votes
1 answer

Pika + RabbitMQ: setting basic_qos to prefetch=1 still appears to consume all messages in the queue

I've got a python worker client that spins up a 10 workers which each hook onto a RabbitMQ queue. A bit like this: #!/usr/bin/python worker_count=10 def mqworker(queue, configurer): connection =…
growse
  • 3,554
  • 9
  • 43
  • 66
19
votes
3 answers

inequivalent arg 'durable' for queue

I need some help. I have this code below and the logs tell me that I'm not passing the durable parameter, but as you can see I'm passing. I have tried everything and there is always the same mistake. To mount this code I used these…
Daniel Pereira
  • 495
  • 1
  • 5
  • 19
18
votes
1 answer

Is there any way to list queues in a rabbitmq via pika?

I know that we can do this to list queue in a rabbitmq. rabbitmqctl list_queues but how can I do this via pika?
kerwin
  • 941
  • 2
  • 12
  • 22
17
votes
1 answer

RabbitMQ, Pika and reconnection strategy

I'm using Pika to process data from RabbitMQ. As I seemed to run into different kind of problems I decided to write a small test application to see how I can handle disconnects. I wrote this test app which does following: Connect to Broker, retry…
jay_t
  • 3,593
  • 4
  • 22
  • 27
17
votes
2 answers

RabbitMQ closes connection when processing long running tasks and timeout settings produce errors

I am using a RabbitMQ producer to send long running tasks (30 mins+) to a consumer. The problem is that the consumer is still working on a task when the connection to the server is closed and the unacknowledged task is requeued. From researching I…
Greg
  • 8,175
  • 16
  • 72
  • 125
1
2 3
44 45