RabbitMQ学习之:(二)介绍 (转贴+我的评论)

转自:http://lostechies.com/derekgreer/2012/03/05/rabbitmq-for-windows-introduction/

RabbitMQ for Windows: Introduction

Posted by Derek Greer on March 5, 2012

If you’re interested in getting started with distributed programming and you develop on the Microsoft Windows platform, RabbitMQ may be what you’re looking for.  RabbitMQ is an open source, standards-based, multi-platform message broker with client libraries available for a host of development platforms including .Net.

This series will provide a gentle introduction to getting started with RabbitMQ for .Net developers, including a Windows environment installation guide along with an introduction to basic concepts and features through the use of examples in C#.  In this first installment, we’ll cover installation and basic configuration.

Installation

The first thing to know about RabbitMQ installation is that RabbitMQ runs on theErlang virtual runtime.  “What is Erlang”, you ask, and “Why should I ask our admins to install yet another runtime engine on our servers”?  Erlang is a functional language which places a large emphasis on concurrency and high reliability.  Developed by  Joe Armstrong, Mike Williams, and Robert Virding to support telephony applications at Ericsson, Erlang’s flagship product, the Ericsson AXD301 switch, is purported to have achieved a reliability of nine “9″s.

A popular quote among Erlang adherents is Verding’s “First Rule of Programming”:

“Any sufficiently complicated concurrent program in another language contains an ad hoc informally-specified bug-ridden slow implementation of half of Erlang.” – Robert Verding

Sound like the perfect platform to write a message broker in?  The authors of RabbitMQ thought so too.

With that, let’s get started with the installation.

Step 1: Install Erlang

The first step will be to download and install Erlang for Windows.  You can obtain the latest installer from here (version R15B at the time of this writing) .

After downloading and completing the Erlang installation wizard, you should have a new ERLANG_HOME environment variable set.  If not, you’ll want to set this now so RabbitMQ will be able to locate your installation of Erlang.

Step 2: Install RabbitMQ

Next, download and install the latest version of RabbitMQ for Windows from here(version 2.7.1 at the time of this writing).

Step 3: Install the RabbitMQ Management Plugin

By default, the RabbitMQ Windows installer registers RabbitMQ as a Windows service, so technically we’re all ready to go.  In addition to the command line utilities provided for managing and monitoring our RabbitMQ instance, a Web-based management plugin is also provided with the standard Windows distribution.  The following steps detail how to get the management plugin up and going.

First, from an elevated command prompt, change directory to the sbin folder within the RabbitMQ Server installation directory (e.g. %PROGRAMFILES%\RabbitMQ Server\rabbitmq_server_2.7.1\sbin\).

Next, run the following command to enable the rabbitmq management plugin:

rabbitmq-plugins.bat enable rabbitmq_management 

Lastly, to enable the management plugin we need to reinstall the RabbitMQ service.  Execute the following sequence of commands to reinstall the service:

 
rabbitmq-service.bat stop
rabbitmq-service.bat install
rabbitmq-service.bat start 

To verify management plugin is up and running, start your favorite browser and navigate to http://localhost:55672/mgmt/.  If everything went ok, you should see a screen similar to the following:

 PunCha: 用户名/密码都是guest。

From here, you’ll be able to configure and monitor your RabbitMQ instance.

That concludes our installation guide.  Next time, we’ll walk through writing our first RabbitMQ C# application.

http://blog.csdn.net/puncha/article/details/8449331

时间: 2024-10-10 01:09:29

RabbitMQ学习之:(二)介绍 (转贴+我的评论)的相关文章

RabbitMQ学习(二).NET Client之Work Queues

2 Work queues Distributing tasks among workers Python | Java | Ruby | PHP| C# 转载请注明出处:jiq?钦's technical Blog Work Queues (using the .NET Client) 前面已经介绍过了如何编写程序去发送消息到命名队列,以及从命名队列接收消息. 在这个部分我们将创建一个工作队列(Work Queue),用于将耗时任务(time-consuming tasks)分发给多个工作者(

RabbitMQ学习(二)工作队列

1.工作队列(Work Queue)又叫任务队列(Task Queue)指将任务分发个多个消费者. 2.实际操作: 这里使用一个生产者产生多条数据提供给3个消费者 生产者代码: public class Producter { //队列名称 private final static String QUEUE_NAME = "Work_Queue"; public static void main(String[] args) throws IOException, TimeoutExc

rabbitMQ学习笔记(二) 简单的发送与接收消息 HelloWorld

首先要下载rabbitmq的javaClient库,然后加入到项目中,下载地址为:http://www.rabbitmq.com/releases/rabbitmq-java-client/v3.1.5/rabbitmq-java-client-bin-3.1.5.zip 1.发送消息 发送消息首先要获取与rabbitmq-server的连接,然后从渠道(chann)中指定的queue发送消息 , 不能定义两个queue名字相同,但属性不同 示例: Sender01.java 1 package

RabbitMQ学习系列(四): 几种Exchange 模式

上一篇,讲了RabbitMQ的具体用法,可以看看这篇文章:RabbitMQ学习系列(三): C# 如何使用 RabbitMQ.今天说些理论的东西,Exchange 的几种模式. AMQP协议中的核心思想就是生产者和消费者隔离,生产者从不直接将消息发送给队列.生产者通常不知道是否一个消息会被发送到队列中,只是将消息发送到一个交换机.先由Exchange来接收,然后Exchange按照特定的策略转发到Queue进行存储.同理,消费者也是如此.Exchange 就类似于一个交换机,转发各个消息分发到相

RabbitMQ学习系列(三): C# 如何使用 RabbitMQ

上一篇已经讲了Rabbitmq如何在Windows平台安装,还不了解如何安装的朋友,请看我前面几篇文章:RabbitMQ学习系列一:windows下安装RabbitMQ服务 , 今天就来聊聊 C# 实际开发的过程中,怎么调用 用RabbitMQ. 一.客户端 RabbitMQ 有很多客户端API,都非常的好用.我们在一边,一直用的都是 EasyNetQ,所以这里的 demo 只介绍 EasyNetQ 客户端实现.其他的客户端,大家自己去研究吧. EasyNetQ 是一个易于使用的RabbitMQ

RabbitMQ学习和使用

RabbitMQ学习和使用 RabbitMQ介绍 MQ全称Message Queue 消息队列,RabbitMQ是基于AMQP(高级消息队列协议)实现的.消息队列通常用以应用之间相互通信,解决同步问题.MQ是典型的生产者消费者模型,RabbitMQ最常用的三种模式是点对点模式.发布订阅模式.广播模式. RabbitMQ is a message-queueing software called a message broker or queue manager. Simply said; It

【转载】JAVA学习路线二

JAVA学习路线二------------高阶面试 作者:Java高级进阶链接:https://zhuanlan.zhihu.com/p/35301291来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 1.hashcode相等两个类一定相等吗?equals呢?相反呢? 2.介绍一下集合框架? 3.hashmap hastable 底层实现什么区别?hashtable和concurrenthashtable呢? 4.hashmap和treemap什么区别?低层数据结

PHP之RABBITMQ安装篇(二)-WINDOWS下安装

PHP之RABBITMQ安装篇(二)-WINDOWS下安装 AMQP扩展安装 在PHP上安装RabbitMQ之前,先安装PHP的扩展amqp,在安装amqp之前,先查看自己的PHP版本 首先根据PHP的版本选择amqp的版本,再次要下载稳定版本的amqp.我的PHP是5.6.25的,所以选择1.4.0版本的amqp.下载地址:https://pecl.php.net/package/amqp 然后根据PHP的版本,线程安全是否激活,多少位的,来选择下载哪个版本:我的PHP是5.6版本的,线程安全

ASP.NET MVC学习系列(二)-WebAPI请求

继续接着上文 ASP.NET MVC学习系列(一)-WebAPI初探 来看看对于一般前台页面发起的get和post请求,我们在Web API中要如何来处理. 这里我使用Jquery 来发起异步请求实现数据调用. 继续使用上一文章中的示例,添加一个index.html页面,添加对jquery的引用. 一.无参数Get请求 一般的get请求我们可以使用jquery提供的$.get() 或者$.ajax({type:"get"}) 来实现: 请求的后台Action方法仍为上篇文章中的GetU

Windows API 编程学习记录<二>

恩,开始写Windows API编程第二节吧. 上次介绍了几个关于Windows API编程最基本的概念,但是如果只是看这些概念,估计还是对Windows API不是很了解.这节我们就使用Windows API 让大家来了解下Windows API的用法. 第一个介绍的Windows API 当然是最经典的MessageBox,这个API 的作用就是在电脑上显示一个对话框,我们先来看看这个API的定义吧: int WINAPI MessageBox(HWND hWnd, LPCTSTR lpTe