amqp

Publishing to the default rabbitmq exchange using the http api

∥☆過路亽.° 提交于 2019-12-04 23:25:31
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 HTTP api includes the name of the exchange. http://localhost:15672/api/exchanges/vhost/name/publish

RabbitMQ Topic exchanges: 1 Exchange vs Many Exchanges

巧了我就是萌 提交于 2019-12-04 23:00:46
I have a scenario where I have a series of processes I need to perform, each step is done and scaled in independent applications. I am using topic exchanges for all exchanges. Current topology is something like this: P -> X -> Q -> C/P -> X -> Q -> C We are "versioning" our queues to deal with probable requirements changes effecting message structure. Bindings might look something like this: step1.exchange bound to step1.v1.queue with binding key step1.v1 step1.exchange bound to step1.v2.queue with binding key step1.v2 There are other binding patterns that are not version related that also

zookeeper+KAFKA 集群搭建

随声附和 提交于 2019-12-04 22:19:52
zookeeper+KAFKA 集群搭建 ZooKeeper是一个分布式的1600174884,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件。它是一个为分布式应用提供一致性服务的软件,提供的功能包括:配置维护、域名服务、分布式同步、集群管理等。因为Kafka集群是把状态信息保存在Zookeeper中的,并且Kafka的动态扩容是通过Zookeeper来实现的,所以需要优先搭建Zookeerper集群,建立分布式状态管理。开始准备环境,搭建集群: zookeeper是基于Java环境开发的所以需要先安装Java 然后这里使用的zookeeper安装包版本为zookeeper-3.4.14,Kafka的安装包版本为kafka_2.11-2.2.0。 AMQP协议:Advanced Message Queuing Protocol (高级消息队列协议)是一个标准开放的应用层的消息中间件协议。AMQP定义了通过网络发送的字节流的数据格式。因此兼容性非常好,任何实现AMQP协议的程序都可以和与AMQP协议兼容的其他程序交互,可以很容易做到跨语言,跨平台。 server1:192.168.42.128 server2:192.168.42.129 server3:192.168.42.130

Why shouldn't I use rabbitmq topic exchanges for everything?

故事扮演 提交于 2019-12-04 19:55:29
It seems like the worker pattern, fanout, and filtered topics can all be implemented with topic exchanges. Why would I ever use a direct or fanout exchange instead? We would like to codify common patterns found in our org in a library that abstracts the infinite flexibility of amqp (naming conventions, defaulting to durable, sending common headers, expirations etc.). Should we leverage the different exchange types or implement all patterns with topics; why? (We have consumers/publishers in Java via spring boot, in golang, and in php) Why shouldn't I use rabbitmq topic exchanges for everything?

Content-based routing with RabbitMQ and Python

寵の児 提交于 2019-12-04 18:58:22
问题 Is it possible with RabbitMQ and Python to do content-based routing? The AMQP standard and RabbitMQ claims to support content-based routing, but are there any libraries for Python which support specifying content-based bindings etc.? The library I am currently using (py-amqplib http://barryp.org/software/py-amqplib/) seems to only support topic-based routing with simple pattern-matching (#, *). 回答1: The answer is "yes", but there's more to it... :) Let's first agree on what content-based

when does an AMQP/RabbitMQ channel with no connections die?

馋奶兔 提交于 2019-12-04 18:54:18
问题 I have a simple RabbitMQ test program randomly enqueuing messages, and another reading them, all using Spring-AMQP. If the consumer dies (for example killing a process without having a chance to close its connection or channel), any messages that it had not acknowledged appear to remain unacknowledged forever. I have seen a number of references (for example this question) that say that the channel dies when it has no connections, and that remaining unack'd messages will be redelivered. That's

docker php-fpm 拓展安装

為{幸葍}努か 提交于 2019-12-04 16:57:27
1. PHP 源码 为了保证 Docker 镜像尽量小,PHP 的源文件是以压缩包的形式存在镜像中,官方提供了 docker-php-source 快捷脚本,用于对源文件压缩包的解压(extract)及解压后的文件进行删除(delete)的操作。 示例: FROM php:7.1-apache RUN docker-php-source extract \ # 此处开始执行你需要的操作 \ && docker-php-source delete 注意:一定要记得删除,否则解压出来的文件会大大增加镜像的文件大小。 2. 安装扩展 2.1. 核心扩展 这里主要用到的是官方提供的 docker-php-ext-configure 和 docker-php-ext-install 快捷脚本,如下 FROM php:7.1-fpm RUN apt-get update \ # 相关依赖必须手动安装 && apt-get install -y \ libfreetype6-dev \ libjpeg62-turbo-dev \ libmcrypt-dev \ libpng-dev \ # 安装扩展 && docker-php-ext-install -j$(nproc) iconv mcrypt \ # 如果安装的扩展需要自定义配置时 && docker-php-ext-configure

How would you encode a Map<String, Object> using Protocol Buffers?

[亡魂溺海] 提交于 2019-12-04 16:52:12
问题 I'm trying to use Protocol Buffers for message serialization. My message format should contain Map< String, Object > entries ... but how do I write the .proto definition? As far as I know, Protocol Buffers does not have a build-in Map type. I could model around that using repeating fields. But the big problem I have is, that you need to define all your types. I want my message to be flexible, so I can't specify the types. Any ideas? 回答1: I'd model a tuple with a key and a value (probably one

RabbitMQ new connection refused due to SocketException

那年仲夏 提交于 2019-12-04 16:04:21
问题 while trying to create a new connection to rabbitmq running on a different server, I got the following error: java.io.IOException at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:106) at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:102) at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:124) at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:406) at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:516) at com

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

為{幸葍}努か 提交于 2019-12-04 12:26:15
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 functionality. I just need simple auth, maybe sqlalchemy, easy ajax, amqp, xmlrpc would be helpful. I