RabbitMQ

RabbitMQ是實現了進階訊息佇列協定的開源訊息代理軟體。RabbitMQ伺服器是用Erlang語言編寫的,而群集和故障轉移是構建在開放電信平台框架上的。所有主要的程式語言均有與代理介面通訊的客戶端函式庫。

Learning RabbitMQ

Installation
Cluster & Load Balancing
Development
Commercial RabbitMQ

Benchmark Tools

Java Tools

URL: https://www.rabbitmq.com/java-tools.html

Development with RabbitMQ

Development with RabbitMQ

Bash

curl
curl -u login:pass -i -H "content-type:application/json" -X POST http://localhost:15672/api/exchanges/%2Fvhost/exchange/publish \
-d'{"properties":{},"routing_key":"","payload":"you message","payload_encoding":"string"}'
rabbitmqadmin
while read -r line; do 
echo $line | rabbitmqadmin publish exchange=amq.default routing_key=my_queue ;
done < messages

rabbitmqadmin publish exchange=amq.default routing_key=test payload="hello, world"

# With parallel
cat messages | parallel -j 100 \
./rabbitmqadmin -H $RABBITMQ_HOST \
-u $RABBITMQ_USERNAME \
-p $RABBITMQ_PASSWORD \
publish exchange=amq.default \
routing_key=myqueue \
payload="{}"
Development with RabbitMQ

Python

Tutorials
Development with RabbitMQ

PHP

Tutorials

Config RabbitMQ

Official Tutorials Index

Q & A

How to Find Config File Location

1. Check the Log File

node           : rabbit@example
home dir : /var/lib/rabbitmq
config file(s) : /etc/rabbitmq/advanced.config
: /etc/rabbitmq/rabbitmq.conf

2. The comand rabbitmq-diagnostics 

rabbitmq-diagnostics status
rabbitmq-diagnostics status -n [node name]

不同平台的路徑位置

Platform Default Configuration File Directory Example Configuration File Paths
Generic binary package $RABBITMQ_HOME/etc/rabbitmq/ $RABBITMQ_HOME/etc/rabbitmq/rabbitmq.conf, $RABBITMQ_HOME/etc/rabbitmq/advanced.config
Debian and Ubuntu /etc/rabbitmq/ /etc/rabbitmq/rabbitmq.conf, /etc/rabbitmq/advanced.config
RPM-based Linux /etc/rabbitmq/ /etc/rabbitmq/rabbitmq.conf, /etc/rabbitmq/advanced.config
Windows %APPDATA%\RabbitMQ\ %APPDATA%\RabbitMQ\rabbitmq.conf, %APPDATA%\RabbitMQ\advanced.config
MacOS Homebrew Formula ${install_prefix}/etc/rabbitmq/, and the Homebrew cellar prefix is usually /usr/local ${install_prefix}/etc/rabbitmq/rabbitmq.conf, ${install_prefix}/etc/rabbitmq/advanced.config