Questions tagged [py-amqplib]

15 questions
28
votes
3 answers

Getting number of messages in a RabbitMQ queue

We're using amqplib to publish/consume messages. I want to be able to read the number of messages on a queue (ideally both acknowledged and unacknowledged). This will allow me to show a nice status diagram to the admin users and detect if a certain…
Basic
  • 26,321
  • 24
  • 115
  • 201
11
votes
5 answers

Wait for a single RabbitMQ message with a timeout

I'd like to send a message to a RabbitMQ server and then wait for a reply message (on a "reply-to" queue). Of course, I don't want to wait forever in case the application processing these messages is down - there needs to be a timeout. It sounds…
EMP
  • 59,148
  • 53
  • 164
  • 220
10
votes
3 answers

How do you remove a queue binding from RabbitMQ?

I am using RabbitMQ to route messages to interested subscribers by topic. Each subscriber has a queue, and I bind the queue to the topics they are interested in. I would like to allow the user to remove an item from their topic list. In my setup,…
Tony Lenzi
  • 4,219
  • 5
  • 31
  • 25
5
votes
1 answer

Librabbitmq 2.0.0 with Python 3 gives TypeError: can't pickle memoryview objects

I am using the latest master branch of the git repo https://github.com/celery/librabbitmq and installing librabbitmq==2.0.0 for Python 3.6 by following the instructions in the readme Using the development version You can clone the repository by…
dowjones123
  • 3,695
  • 5
  • 40
  • 83
5
votes
2 answers

Multiple consumers & producers connected to a message queue, Is that possible in AMQP?

I'd like to create a farm of processes that are able to OCR text. I've thought about using a single queue of messages which is read by multiple OCR processes. I would like to ensure that: each message in queue is eventually processed the work is…
Piotr Czapla
  • 25,734
  • 24
  • 99
  • 122
3
votes
1 answer

How to wait for messages on multiple queues using py-amqplib

I'm using py-amqplib to access RabbitMQ in Python. The application receives requests to listen on certain MQ topics from time to time. The first time it receives such a request it creates an AMQP connection and a channel and starts a new thread to…
EMP
  • 59,148
  • 53
  • 164
  • 220
3
votes
0 answers

Can't set maximum queue length in Rabbitmq

I'm trying to set the max length for a Rabbitmq queue using the Python amqplib library. But the queue does not get limited. http://www.rabbitmq.com/maxlength.html I've reset the Rabbitmq server each time to delete the queue. What am I doing…
Heatonjb
  • 59
  • 6
2
votes
1 answer

AMQP transactions with Kombu and Rabbitmq

I cant seem to find any documentation on using AMQP transactions through the Kombu api. This page talks about appending a message to the transactional state but it does not seem related. I know the pika backend supports them and I am quite sure the…
dgorissen
  • 6,207
  • 3
  • 43
  • 52
2
votes
1 answer

Posting messages in two RabbitMQ queue, instead of one (using py-amqp)

I've got this strange problem using py-amqp and the Flopsy module. I have written a publisher that sends messages to a RabbitMQ server, and I wanted to be able to send it to a specified queue. On the Flopsy module that is not possible, so I tweaked…
Khelben
  • 6,283
  • 6
  • 33
  • 46
2
votes
3 answers

How to use listen on basic.return in python client of AMQP

I'd like to make sure that my message was delivered to a queue. To do so I'm adding the mandatory param to the basic_publish. What else should I do to receive the basic.return message if my message wasn't successfully delivered? I can't use…
Piotr Czapla
  • 25,734
  • 24
  • 99
  • 122
1
vote
0 answers

py-amqplib connection close failure on Google App Engine only

I'm trying to use py-amqplib on Google App Engine to communicate with rabbitmq cluster (also host on App Engine). I have everything working as expected except that when I go to close the connection I an exception thrown: Exception on /api/*****…
ennui77
  • 203
  • 2
  • 7
1
vote
1 answer

Multiple workers consume same message from RabbitMQ queue

I use py-amqp module and Python 3.4 When I run more than 1 listener and start one producer to publish messages listeners takes one message and start to process it simultaniously. I do not need that kind of behaviour because messages should be…
Dmitry Tabakerov
  • 441
  • 7
  • 17
1
vote
2 answers

How to detect an exchange does not exist with py-amqp

I want to be able to detect whether an exchange does not exist when submitting a message to AMQP. Consider following example. #!/usr/bin/python import amqp from time import sleep conn = amqp.Connection(host="localhost:5672", userid="guest",…
jay_t
  • 3,593
  • 4
  • 22
  • 27
0
votes
1 answer

py-amqp/flopsy: Waiting for a single AMQP message in Python

I have a similar question to this one: It's very easy in py-amqp/flopsy to say "I'm going to wait forever, and I want this callback to be called whenever a message comes in," but I can't find any way of saying "OK, I got the message I want now stop…
Trevor Burnham
  • 76,828
  • 33
  • 160
  • 196
0
votes
1 answer

Node.js+node_amqp.js can`t connect to ActiveMQ either 61616 or 5672 ports

need some advice. This is example, which I start on node.js: var amqp = require('amqplib'); amqp.connect('amqp://localhost:61616').then(function(conn) { conn.once('SIGINT', function() { conn.close(); }); return…