pika

Cannot connect to RabbitMQ on Heroku with pika due to ProbableAccessDeniedError

别说谁变了你拦得住时间么 提交于 2019-12-23 12:43:35
问题 I just set up a RabbitMQ add-on in heroku. After developing my app to queue up and consume messages running on a local instance, I deployed it to Heroku and have not been able to connect successfully yet. The username/password & hostname/port/vhost are all from heroku config . If I change the username or password, the error changes to ProbableAuthenticationError which makes me believe the authentication is at least correct, but likely an issue with my vhost or some other missing configuration

SparkStreaming, RabbitMQ and MQTT in python using pika

帅比萌擦擦* 提交于 2019-12-18 12:54:42
问题 Just to make things tricky, I'd like to consume messages from the rabbitMQ queue. Now I know there is a plugin for MQTT on rabbit (https://www.rabbitmq.com/mqtt.html). However I cannot seem to make an example work where Spark consumes a message that has been produced from pika. For example I am using the simple wordcount.py program here (https://spark.apache.org/docs/1.2.0/streaming-programming-guide.html) to see if I can I see a message producer in the following way: import sys import pika

How to create a delayed queue in RabbitMQ?

て烟熏妆下的殇ゞ 提交于 2019-12-18 09:55:14
问题 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 needs to be re-queued again. There are always the possibility that you will receive more messages than you can handle, maybe the HTTP server is slow, or the database is under too much stress. I also found it very useful when something went wrong in

RabbitMQ change queue parameters on a production system

送分小仙女□ 提交于 2019-12-17 18:39:10
问题 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 pretty vanilla use-case for RabbitMQ. Now I'd like to change some of the queue parameters (specifically, I'd like to bind queues to a new dead-letter exchange with a certain routing key). My problem is that making this change in place on a production

AttributeError: 'module' object has no attribute 'AsyncoreConnection'

主宰稳场 提交于 2019-12-13 03:47:13
问题 I am using scrapy-rabbitmq to fetch the url from RabbitMQ into my scrapy.I am using the following in my settings.py file RABBITMQ_CONNECTION_PARAMETERS = {"credentials": pika.PlainCredentials('test', 'test'),'host': '10.0.12.103', 'port': 5672} But I am unable to connect to the rabbitmq .I am getting the foloowing error AttributeError: 'module' object has no attribute 'AsyncoreConnection' I have asked a another question that how to consume the data from RabbitmQ using scrapy here 回答1: I had

Key-aware consumers in RabbitMQ

一世执手 提交于 2019-12-12 18:10:50
问题 Let's consider a system where thousands of clients data is published to a RabbitMQ exchange (client_id is known at this stage). Exchange routes them to a single queue. Finally, messages are consumed by a single application. Works great. However, over time, the consuming application becomes a bottleneck and needs to be scaled horizontally. The problem is the system requires that messages considering particular client are consumed by the same instance of the application. I can create lots of

Pika: Write buffer exceeded warning

隐身守侯 提交于 2019-12-12 12:13:12
问题 Our software program was working fine for 5 months and now suddenly we have started receiving Pika warnings which ultimately lead to an exception. Pika 0.9.5 UserWarning: Write buffer exceeded warning threshold. I have searched many forums, but to very little satisfaction. One solution described was to ignore these warnings altogether, but I am a little skeptical about that. Any help in this matter will be greatly appreciated. It is very urgent. Thanks 回答1: This: http://lists.rabbitmq.com

Pika - Rabbitmq, using Basic.get to cosume single message from queue

耗尽温柔 提交于 2019-12-12 03:24:30
问题 I'm using the method shown here like this: while method_frame is None: method_frame, header_frame, method_frame= channel.basic.get("test_queue) It's looks like this polling is not so efficient this way, because basic get is working also if queue is empty, and bringing empty messages. I need a kind of logic which takes a single message, only when I have the opportunity to take care of it, that's why I chose basic.get and not basic.consume . Do anybody has and idea for doing a more efficient

Stop channel.basic_consume if the connection is idle/Not consuming from long time

与世无争的帅哥 提交于 2019-12-11 12:54:18
问题 I am having a use case in which i want get the last idle time(last message processed time) of a pika consumer(pika.BlockingConnection). Usecase: If the last processed time is greater than Threshold time(ex: 1 hr). I want the consumer to get exited or have a callback method to decide on what i need to do? Like sending a notification to a user. Is there any way to do this? 回答1: pika supports a timeout callback. You could add this callback at the end of each message receipt, keeping the

How to do publisher timeouts in rabbitmq + pika

折月煮酒 提交于 2019-12-11 05:25:14
问题 Given that rabbitmq implements flow control, which can slow some of the message publishing down, How can one use timeouts. Also, as pika also doesnt implement publisher confirms, which language and library are recommended for publishing code 来源: https://stackoverflow.com/questions/12248331/how-to-do-publisher-timeouts-in-rabbitmq-pika