RabbitMQ

RabbitMQ & Spring amqp retry without blocking consumers

做~自己de王妃 提交于 2019-12-25 03:58:22
问题 I'm working with RabbitMQ and Spring amqp where I would prefer not to lose messages. By using exponential back off policy for retrying, I'm potentially blocking my consumers which they could be working off on messages they could handle. I'd like to give failed messages several days to retry with the exponential back off policy, but I don't want a consumer blocking for several days and I want it to keep working on the other messages. I know we can achieve this kind of functionality with

erl with centos “Failed to create main carrier for ll_alloc”

喜夏-厌秋 提交于 2019-12-25 03:36:15
问题 i am having a centos vps. i have installed erlang by the command rpm -Uvh erlang-17.4-1.el6.x86_64.rpm Now whenever i try to run my rabbitmq-server. or i just issue erl command then i get this error. Failed to create main carrier for ll_alloc Aborted is it some memory issue erlang is unable to get free memory or what? here are memory stats of the machine sudo cat /proc/meminfo MemTotal: 4194304 kB MemFree: 104520 kB Cached: 2718800 kB Buffers: 0 kB Active: 1729508 kB Inactive: 2170684 kB

Spring AMQP ensuring message order in multi-threaded environment

筅森魡賤 提交于 2019-12-25 03:36:05
问题 RabbitMQ guarantees message order if the same Publish Channel->Exchange->Queue->Receive Channel is used. It appears Spring AMQP allows me to guarantee all those pieces except for the publish channel. This is causing messages to get out of order. Below is the problem case: 1.) I have a single thread publishing messages in order on a single exchange 2.) I have a collection of other threads publishing messages on different exchanges and sometimes creating new consumers for different exchanges

Celery/Rabbitmq/Django - Old tasks being executed without being called in my code

天涯浪子 提交于 2019-12-25 03:32:42
问题 I have a simple shared celery task like this: @shared_task def add(): x = barakah(name="add()", year="add()", month="add()") x.save() return "id is add()= " + str(x.id) And I call it here in this CELERYBEAT_SCHEDULE: CELERYBEAT_SCHEDULE = { 'add': { 'task': 'water.tasks.add', 'schedule': timedelta(seconds=3), 'args': () }, } This is the celery command I use: celery -A adi worker -B -l info It runs fine as per schedule but other old tasks are also executing as well. How do I stop the old tasks

Celery keeps creating rabbitmq queues, pilling all over

冷暖自知 提交于 2019-12-25 03:28:09
问题 Using celery (3.1.8 + ) with django 1.6 all tasks are defined to ignore results (is this the correct syntax?) @shared_task(ignore_result=True) def somefunc(): pass When I look at the rabbitmq queues I see more and more queues created by celery with names like: 19926fa9965e40c19ed9640c2b42ce1e and contain one message (similar to the following): correlation_id: 19926fa9-965e-40c1-9ed9-640c2b42ce1e priority: 0 delivery_mode: 2 headers: content_encoding: binary content_type: application/x-python

消息队列-RabbitMQ

狂风中的少年 提交于 2019-12-25 02:55:47
什么是消息队列? 消息队列是一种在应用(服务)间的通讯方式,消息发送后可以立即返回,由消息系统来确保消息的可靠传递。消息发布者只管把消息发布到 MQ 中而不用管谁来取,消息使用者只管从 MQ 中取消息而不管是谁发布的。这样发布者和使用者都不用知道对方的存在。 常用的消息队列有哪些? RabbitMQ Kafka ActiveMQ RocketMQ(阿里的) RabbitMQ实战 安装RabbitMQ 方式1:windows下安装包安装 因为RabbitMQ 是一个由 Erlang 语言开发的,所有安装之前要安装Erlang: Erlanng官网 去RabbitMQ下载安装包: RabbitMQ官网 开始安装-RabbitMQ安装包进行傻瓜式安装即可 在windows下配置erlang环境变量 进入RabbitMQ的安装bin目录,执行命令: rabbitmq-plugins enable rabbitmq_management---安装管理插件 方式2:docker安装(笔者推荐) docker pull rabbitmq:3.7.7-management :拉取镜像 docker run -d -p 15672:15672(管理界面端口映射) -p 5672:5672(TCP端口映射,服务通过此端口与RabbitMQ建立TCP连接,完成异步消息监听和发送) --name

RabbitMQ database files

谁都会走 提交于 2019-12-25 02:22:53
问题 I'm running RabbitMQ V.2.0.0. on a Linux machine. The mnesia base is current the default, but the within that directory Rabbit creates directories, eg. rabbit@ip-123.1.1.123. The ip in the directory name is based on the inet addr of the machine. This directories hold information about user, exchanges, vhost (I think). My question is, how can I fix/config these directory names with ip to be not based on ip? 回答1: To change the Mnesia directory, just set MNESIA_DIR in /etc/rabbitmq/rabbitmq.conf

RabbitMQ - Certificate Authentication

China☆狼群 提交于 2019-12-25 01:18:57
问题 I have written a client / server apps on .Net which authenticate against RabbitMQ using username/password/server. Our security team suggested to change this to certificate authentication. I have searched RabbitMQ site and on forums but could not locate a solution. How do I install, configure certificates in .Net Client and Server components (and/or machines) for authentication? What are the parameters needed to create connection in this scenario? Can any one please point to the right resource

Messages don't survive Pod restarts in Rabbitmq autocluster Kubernetes installation

喜你入骨 提交于 2019-12-25 00:45:06
问题 I have created Rabbitmq autocluster with 3 Pods in Kubernetes according to public repository: https://github.com/kuberstack/kubernetes-rabbitmq-autocluster Messages in queue don't survive Pod restarts in the following basic scenario: Create durable queue "test" Send message to queue "test" Wait 10 minutes and delete pod 1. Wait 10 minutes and delete pod 2. Wait 10 minutes and delete pod 3. List queues. After deleting all 3 pods, queue "test" always doesn't exist. After each pod deletion,

centos7安装RabbitMQ

老子叫甜甜 提交于 2019-12-24 21:52:27
1,安装编译工具 yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel 2,下载并解压otp_src_18.3.tar.gz wget http://erlang.org/download/otp_src_18.3.tar.gz tar -zxvf otp_src_18.3.tar.gz 3,编译安装erlang cd otp_src_18.3 ./configure --prefix=/data/soft/erlang --with-ssl -enable-threads -enable-smmp-support -enable-kernel-poll --enable-hipe --without-javac make && make install 4,设置环境变量 vim /etc/profile 在文件末尾添加下面代码, ‘ERLANG_HOME’等于上一步’–prefix’指定的目录 ERLANG_HOME=/usr/local/erlang PATH=$ERLANG_HOME/bin:$PATH export ERLANG_HOME export PATH 使环境变量生效 source /etc/profile 输入命令检验是否安装成功 erl 如下输出表示安装成功