转:http://blog.csdn.net/xuguang121/article/details/7679804
RabbitMQ 是AMQP标准协议下的另外一种实现,这篇blog记录了我的安装与测试。
安装步骤
2、 sudo yum install gcc glibc-devel make ncurses-devel openssl-devel autoconf
3、 yum install unixODBC unixODBC-devel
4、 wget http://erlang.org/download/ otp_src_R15B01 .tar.gz
安装遇到的问题
Fix :1.sudo yum install gcc glibc-devel make ncurses-devel openssl-devel autoconf1.down load Erlang otp_src_R15B01.tar.gz http://www.erlang.org/download.html2. install Erlanga.yum groupinstall Base "Development Tools" "Perl Support"b. ./configure --prefix=/usr/local/erlangError:configure: error: No curses library functions foundconfigure: error: /bin/sh '/usr/local/xuguang/RabbitMq/erlang/otp_src_R15B01/erts/configure' failed for ertsRootCause:缺少ncurses安装包Fix:yum -y install ncurses-develc. make make install出现了失败:
d.tar zxvf /usr/local/xuguang/RabbitMq/otp_doc_man_R15B01.tar.gz -C /usr/local/erlang/lib/erlange.have not 编辑.erlang文件Yum 直接安装:需要加到 yum 仓库中 wget -O /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo3.rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc4.rpm -ivh rabbitmq-server-2.8.2-1.noarch.rpmerror: Failed dependencies:erlang >= R12B-3 is needed by rabbitmq-server-2.8.2-1.noarch
启动
对于cluster启动与针对集群的测试这里就不描述了。
性能测试:
Testenv
1.Broker : 1 VM 2 cpu 8G memory
2.Sender : run java command /usr/bin/java -classpathcommons-io-1.2.jar:commons-cli-1.1.jar:rabbitmq-client.jar:. ConcurrencySend -c100 -n 100(same as QPID C++ Tool)
3.Receiver: run java command /usr/bin/java -classpathcommons-io-1.2.jar:commons-cli-1.1.jar:rabbitmq-client.jar:. SimpleConsumer>receive.result
TestResult
1. SenderMessage 10000 Cost 3.408s (it include the thread creat and join time) sowe can define the Send request >=2873 request/s
SendMessage Body: Xuguang Test Start TimeTue Jun 12 05:11:30 GMT 2012
SendMessage Body: Xuguang Test Start TimeTue Jun 12 05:11:30 GMT 2012
SendMessage Body: Xuguang Test Start TimeTue Jun 12 05:11:30 GMT 2012
SenderCost Time3408ms
2. ReceiveMessage :total receive 10000 and Cost time more than 3s so we can defineReceiver request <=3333request/s
wdhf1wco001:root >grep "Message Receive" ./receive.result -wc
10000
First :messageMessageReceive TimeTue Jun 12 05:19:55 GMT 2012Xuguang Test Start TimeTue Jun 1205:19:55 GMT 2012
Last:Message ReceiveTimeTue Jun 12 05:19:58 GMT 2012Xuguang Test Start TimeTue Jun 12 05:19:58 GMT2012
3. Broker(10.224.57.130)
CPU
Memory
AttachMent Is Rabbitmq compare with QPID