amqp

How can queues be made private/secure in RabbitMQ in a multitenancy system?

戏子无情 提交于 2019-12-20 08:57:18
问题 I have read the Get Started guide provided by RabbitMQ and have even contributed the sixth example to stormed-amqp, so I have an inkling of knowledge about AMQP. However, the guide is not comprehensive and avoids things like authentication and authorization. We're designing a multitenancy system that will use RabbitMQ in an RPC-type of situation. What is perhaps different about this implementation of RPC is that the remote procedures will actually be other tenant programs on the system.

Can RabbitMQ consumer configure to consume only a defined number of attempts for the same message

╄→尐↘猪︶ㄣ 提交于 2019-12-20 04:25:18
问题 Does RabbitMQ capable in a way, I can define my consumer that it has a limit of consuming the same message. i.e my consumer doing a basic Reject with enqueue=true. And it will infinitely keep on listening to the same message. I am not talking about TTL on the queue side. But a control/config over consumer to tell I want to consume this only 5 times and then send it to another queue for instance. Can this be achieved ? 回答1: So yes I believe this can be done. You will need to cache the delivery

AMQP & Openwire - Activemq broker and 2 different consumers

北慕城南 提交于 2019-12-20 03:11:31
问题 I have an activeMQ broker that supports both amqp and openwire. Is it possible that a producer of openwire (tcp, port 61616) will produce to a queue that have a consumer that uses amqp protocol instead? or am i limited to the same protocol consumers&producers only? 回答1: Yes, it is possible to interoperate with the OpenWire JMS client and an AMQP client using ActiveMQ. The destinations that hold the messages are not separate spaces therefore message place on a Queue by a client of one type are

RabbitMQ的几种应用场景

落花浮王杯 提交于 2019-12-19 21:04:43
RabbitMQ主页:https://www.rabbitmq.com/ AMQP AMQP协议是一个高级抽象层消息通信协议, RabbitMQ是 AMQP协议的实现。它主要包括以下组件: 1.Server(broker): 接受客户端连接,实现 AMQP消息队列和路由功能的进程。 2.Virtual Host:其实是一个虚拟概念,类似于权限控制组,一个Virtual Host里面可以有若干个Exchange和Queue,但是权限控制的最小粒度是Virtual Host 3.Exchange:接受生产者发送的消息,并根据Binding规则将消息路由给服务器中的队列。ExchangeType决定了Exchange路由消息的行为,例如,在RabbitMQ中,ExchangeType有direct、Fanout和Topic三种,不同类型的Exchange路由的行为是不一样的。 4. Message Queue:消息队列,用于存储还未被消费者消费的消息。 5.Message: 由Header和Body组成,Header是由生产者添加的各种属性的集合,包括Message是否被持久化、由哪个Message Queue接受、优先级是多少等。而Body是真正需要传输的APP数据。 6. Binding:Binding联系了 Exchange与 Message Queue。 Exchange在与多个

Waiting for all rabbitmq responses on a fanout exchange?

佐手、 提交于 2019-12-19 08:27:58
问题 I've configured a rabbitmq fanout exchange called " ex_foo " for a RPC workload. When clients connect to the server, they create their own non-durable RPC receive queue and connect to it with a BasicConsumer. The apps listen for messages/commands and respond to the queue defined in the reply_to part of the request. One of the simple messages/commands I'm sending out the the fanout exchange (and thus, every application/client connected to it) is a type of ping request message , and my problem

AMQP C++ implementation

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-19 00:25:14
问题 We are writing C++ code which needs messaging. Is there a free/open-source and stable AMQP server available that has equally stable C++ client library with it. We also need to provide Python interface of our code to users (idea is to do maximum stuff in C++ and expose the API in Python). What can be best way to achieve this. 回答1: For future reference, take a look at Apache Qpid - it has a C++ client library and is very good. The problem for your use-case is that Rabbit implements AMQP 0-8 and

Reading from multiple queues, RabbitMQ

纵饮孤独 提交于 2019-12-18 16:52:00
问题 I am new to RabbitMQ. I want to be able to handle reading messages without blocking when there are multiple queues (to read from). Any inputs on how I can do that? //Edit 1 public class Rabbit : IMessageBus { private List<string> publishQ = new List<string>(); private List<string> subscribeQ = new List<string>(); ConnectionFactory factory = null; IConnection connection = null; IModel channel = null; Subscription sub = null; public void writeMessage( Measurement m1 ) { byte[] body =

Reading from multiple queues, RabbitMQ

自闭症网瘾萝莉.ら 提交于 2019-12-18 16:51:25
问题 I am new to RabbitMQ. I want to be able to handle reading messages without blocking when there are multiple queues (to read from). Any inputs on how I can do that? //Edit 1 public class Rabbit : IMessageBus { private List<string> publishQ = new List<string>(); private List<string> subscribeQ = new List<string>(); ConnectionFactory factory = null; IConnection connection = null; IModel channel = null; Subscription sub = null; public void writeMessage( Measurement m1 ) { byte[] body =

RabbitMQ use of immediate and mandatory bits

杀马特。学长 韩版系。学妹 提交于 2019-12-18 11:44:28
问题 I've used RabbitMQ server and for publishing messages when the immediate field was set true ,I tried sending 50,000 messages and using rabbitmqctl list_queues , I saw that number of messages in the queue was zero . Then I changed the immediate flag to false and again tried sending 50,000 messages and then using rabbitmqctl list_queues i saw that total 100,000 messages were in queues.(Till now no consumer was present) And after that I started consumer and it consumed all the 100,000 messages

How can I set up Celery to call a custom initialization function before running my tasks?

放肆的年华 提交于 2019-12-17 22:35:47
问题 I have a Django project and I'm trying to use Celery to submit tasks for background processing ( http://ask.github.com/celery/introduction.html ). Celery integrates well with Django and I've been able to submit my custom tasks and get back results. The only problem is that I can't find a sane way of performing custom initialization in the daemon process. I need to call an expensive function that loads a lot of memory before I start processing the tasks, and I can't afford to call that