amqp

Publishing to the default rabbitmq exchange using the http api

偶尔善良 提交于 2019-12-22 01:38:18
问题 So I am using rabbitmqs http api to do some very basic actions in rabbit. It works great in most situations but I am having an issue figuring out how to use it to publish a message to the default rabbitmq exchange. This exchange is always present, cannot be deleted and has a binding to every queue with a routing key equal to the queue name. My problem is that this queue does not have a name, or rather, it's name is an empty string "". And the URL I have to use to publish this message with the

Python web framework + [a]sync tasks; long polling: not Django

血红的双手。 提交于 2019-12-21 19:53:41
问题 I need to create a project that has a web frontend to manage synchronous task execution (ala fabric), async tasks (AMQP), and long-polling/ajax for tabular viewing of results and queues/large, frequently changing datasets (think tail -f syslog ). I have an existing Python codebase for a lot of the implementation-specific stuff. After looking at a bunch of existing frameworks, the obvious answer appears to be Django+Celery. However, I do not want to "learn Django", nor do I need 95% of it's

When to use direct exchange over fanout exchange

断了今生、忘了曾经 提交于 2019-12-21 07:34:03
问题 As far as I can tell, there is no proper user case for a direct exchange, as anything you can do with it you can do with a fanout exchange, only more expandably. More specifically in reading RabbitMQ in Action the authors numerously refer to the use case that goes something like - "Suppose when a user uploads a picture you need to generate a thumbnail. But then later marketing also tells you to award points for uploading a photo. With RabbitMQ you just have to create another queue and do no

How do I create celery queues on runtime so that tasks sent to that queue gets picked up by workers?

走远了吗. 提交于 2019-12-21 05:57:20
问题 I'm using django 1.4, celery 3.0, rabbitmq To describe the problem, I have many content networks in a system and I want a queue for processing tasks related to each of these network. However content is created on the fly when the system is live and therefore I need to create queues on the fly and have existing workers start picking up on them. I've tried scheduling tasks in the following way (where content is a django model instance): queue_name = 'content.{}'.format(content.pk) # E.g. queue

RabbitMQ AMQP queue design

自闭症网瘾萝莉.ら 提交于 2019-12-21 05:49:05
问题 Below is the desirable design of the queue with: P producer. The application that insert data X exchange. C1-C3 consumer. The applications that read from the queue Queue details: A. Is just like queue log, if there is no client binding then message will be discarded. B. This is a working queue. it will do something if there is criteria match. C. Also a working queue. it will transform the data A is optional, but B. C. will always in queue until some client process connect it. The problem is

Using Spring Integration with RabbitMQ

北城余情 提交于 2019-12-21 02:44:15
问题 I'm in the process of developing a messaging interface for one of our applications. The application is a service which is designed to accept a "Job", do some processing, and return the result (in the form of a File actually). The idea is to use RabbitMQ as the messaging infrastructure and Spring AMQP to handle protocol specific details. I do not want to have a tight coupling from my code to Spring AMQP, so I would like to use Spring Integration to hide the messaging api. So basically I want

AMQP subscriber inside Rails app

耗尽温柔 提交于 2019-12-20 23:09:14
问题 Is it possible to start an AMQP subscriber with my Rails app? Possibly through an initializer or something. I'd like to have it running at the same time that can also interact with Rails models. Below is a pseudo-code example of what I mean. queue.subscribe do |msg,body| Foo.create(....) end 回答1: I usually do this via a separate messaging daemon which loads the rails environment. So a very simplistic example would look like this in rails_root/script/myapp_daemon.rb : #!/usr/bin/env ruby

Using Tornado with Pika for Asynchronous Queue Monitoring

你离开我真会死。 提交于 2019-12-20 12:41:05
问题 I have an AMQP server (RabbitMQ) that I would like to both publish and read from in a Tornado web server. To do this, I figured I would use an asynchronous amqp python library; in particular Pika (a variation of it that supposedly supports Tornado). I have written code that appears to successfully read from the queue, except that at the end of the request, I get an exception (the browser returns fine): [E 101219 01:07:35 web:868] Uncaught exception GET / (127.0.0.1) HTTPRequest(protocol='http

Celery & RabbitMQ running as docker containers: Received unregistered task of type '…'

*爱你&永不变心* 提交于 2019-12-20 09:37:18
问题 I am relatively new to docker, celery and rabbitMQ. In our project we currently have the following setup: 1 physical host with multiple docker containers running: 1x rabbitmq:3-management container # pull image from docker hub and install docker pull rabbitmq:3-management # run docker image docker run -d -e RABBITMQ_NODENAME=my-rabbit --name some-rabbit -p 8080:15672 -p 5672:5672 rabbitmq:3-management 1x celery container # pull docker image from docker hub docker pull celery # run celery

Embedded AMQP Java Broker

孤街醉人 提交于 2019-12-20 09:13:46
问题 I am trying to create integration test for a Scala / Java application that connects to a RabbitMQ broker. To achieve this I would like an embedded broker that speaks AMQP that I start and stop before each test. Originally I tried to introduce ActiveMQ as an embedded broker with AMQP however the application uses RabbitMQ so only speaks AMQP version 0.9.3 whereas ActiveMQ requires AMQP version 1.0. Is there another embedded broker I can use in place of ActiveMQ? 回答1: A completely in-memory