Upload
-
View
466
Download
4
Tags:
Embed Size (px)
DESCRIPTION
http://rd-program.blogspot.tw/2014/05/rabbitmq.html
Citation preview
[email protected] / luke
http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol
http://activemq.apache.org/
http://zguide.zeromq.org/page:all
http://www.rabbitmq.com/
Robust messaging for applicationsEasy to useRuns on all major operating systemsSupports a huge number of developer platformsOpen source and commercially supported
安裝 RabbitMQvi /etc/apt/sources.list:加入下面這行
deb http://www.rabbitmq.com/debian/ testing main將 RabbitMQ 的金鑰匯入:
wget http://www.rabbitmq.com/rabbitmq-signing-key-public.ascsudo apt-key add rabbitmq-signing-key-public.asc使用 apt 安裝:
sudo apt-get updatesudo apt-get install rabbitmq-server安裝管理模組:
sudo rabbitmq-plugins enable rabbitmq_management關閉Server:sudo rabbitmqctl stop重啟Server:sudo rabbitmq-server -detached
RabbitMQ Managementhttp://127.0.0.1:15672/
預設帳密 guest / guest (建議安裝後就更改)
RabbitMQ 簡易教程
http://www.rabbitmq.com/getstarted.html
1 "Hello World!" The simplest thing that doessomething
2 Work queues Distributing tasks among workers
3 Publish/Subscribe Sending messages to many consumers at once
4 Routing Receiving messages selectively
5 Topics Receiving messages based on a pattern
6 RPC Remote procedure call implementation
RabbitMQ 提供的範例
C# (using .net/c# client)
clojure (using Langohr)
erlang (using erlang client)
java (using java client)
javascript/node.js (using amqp.node)
perl (using Net::RabbitFoot)
python (using pika)
python-puka (using puka)
ruby (using Bunny)
ruby (using amqp gem)
Example
虛擬機器(virtual host)用於權限控管 ex. 某個人只能存取 /luke 之下的資訊
交換機(exchange) 類似路由表的路由程序
Fanout ExchangeDirect ExchangeTopic Exchange
佇列(queue) 绑定(binding)
Demo/應用/Q&A