兔子mq框架_春天兔子MQ

兔子mq框架

Spring RabbitMQ is the message broker based on Spring AMQP protocol implementation.

Spring RabbitMQ是基于Spring AMQP协议实现的消息代理。

春天兔子MQ (Spring RabbitMQ)

In my previous post, we have discussed about AMQP Protocol and Spring AMQP Module in detail theoretically. Before reading this post, Please read that post here: Spring AMQP.

在我以前的文章中,我们从理论上详细讨论了AMQP协议和Spring AMQP模块。 在阅读此文章之前,请在此处阅读该文章: Spring AMQP

In this post, we are going to discuss on two things mainly: “How to install RabbitMQ Server” and “How to setup Queue & Exchanges in RabbitMQ Server”.

在本文中,我们将主要讨论两件事:“如何安装RabbitMQ Server”和“如何在RabbitMQ Server中设置队列和交换”。

In my coming post, we will discuss and develop one Spring AMQP RabbitMQ Messaging application with one simple and useful example.

在我的下一篇文章中,我们将通过一个简单而有用的示例来讨论和开发一个Spring AMQP RabbitMQ Messaging应用程序。

Spring AMQP模块 (Spring AMQP Modules)

Spring AMQP Projects are located at the following website: https://projects.spring.io/spring-amqp/

Spring AMQP项目位于以下网站:https://projects.spring.io/spring-amqp/

Spring Framework has two modules to support Spring AMQP RabbitMQ development.

Spring框架有两个模块来支持Spring AMQP RabbitMQ开发。

  • spring-amqp:

    spring-amqp:
  • It is base abstraction for AMQP Protocol implementation.

    它是AMQP协议实现的基础抽象。

  • spring-rabbit:

    Spring兔子:
  • It is the RabbitMQ implementation.

    它是RabbitMQ的实现。

安装Spring RabbitMQ服务器 (Install Spring RabbitMQ Server)

Please use the followings steps to download and install RabbitMQ Server into local system.

请使用以下步骤将RabbitMQ Server下载并安装到本地系统。

  1. Download Erlang and RabbitMQ Server softwares

    下载Erlang和RabbitMQ Server软件
  2. We need to install both Erlang and Rabbit MQ server to start our Application Setup.

    我们需要同时安装Erlang和Rabbit MQ服务器来启动应用程序安装程序。

    1. Download Erlang from https://www.erlang.org/download.html

      从https://www.erlang.org/download.html下载Erlang
    2. Download Rabbit MQ from https://www.rabbitmq.com/install-windows.html

      从https://www.rabbitmq.com/install-windows.html下载Rabbit MQ
  3. Install Erlang Software

    安装Erlang软件
  4. First install Erlang by double clicking “otp_win64_R16B03-1.exe” then follow default options by clicking “Next” then finally click on “Install” button.

    首先通过双击“ otp_win64_R16B03-1.exe”安装Erlang,然后单击“下一步”遵循默认选项,最后单击“安装”按钮。

  5. Install Rabbit MQ Server Software

    安装Rabbit MQ服务器软件
  6. First install Rabbit MQ Server by double clicking “rabbitmq-server-3.2.3.exe” then follow default options by clicking “Next” then finally click on “Install” button.

    首先通过双击“ rabbitmq-server-3.2.3.exe”安装Rabbit MQ Server,然后通过单击“下一步”遵循默认选项,最后单击“安装”按钮。

    Once we install Rabbit MQ Server, we can see it’s HOME folder as shown below:

    安装Rabbit MQ服务器后,我们可以看到它的HOME文件夹,如下所示:

    Set the following SYSTEM variable if missing.

    如果缺少,请设置以下SYSTEM变量。

    RABBITMQ_HOME=C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.2.3

    RABBITMQ_HOME=C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.2.3

  7. Configure Rabbit MQ Server

    配置Rabbit MQ服务器
  8. By default, Rabbit MQ Server comes with no plug-ins that means we cannot use it as a JMS Provider. We need to perform the following steps:

    默认情况下,Rabbit MQ Server没有插件,这意味着我们不能将其用作JMS提供程序。 我们需要执行以下步骤:

    Open CMD Prompt

    打开CMD提示

    CMD>CD to ${RABBITMQ_HOME}/sbin

    CMD>CD to ${RABBITMQ_HOME}/sbin

    Install Rabbit MQ Plug-ins by using below command

    使用以下命令安装Rabbit MQ插件

    CMD> rabbitmq-plugins.bat enable rabbitmq_management

    CMD> rabbitmq-plugins.bat enable rabbitmq_management

    Restart Rabbit MQ Server from Windows Control Pannel –> Services

    从Windows Control Pannel重新启动Rabbit MQ Server –>服务

    Access Rabbit MQ Admin console by using https://localhost:15672/

    通过使用https://localhost:15672/访问Rabbit MQ管理控制台

    Default login details: guest/guest

    默认登录详细信息: 访客/访客

    Rabbit MQ Server home page

    Rabbit MQ服务器主页

  9. To view existing Queues

    查看现有队列
  10. Click on “Queues” to view existing queues or create new queues

    单击“队列”以查看现有队列或创建新队列

  11. To add New Queue

    添加新队列
  12. Click on “Add a new queue” link to create a new queue and provide details

    单击“添加新队列”链接以创建新队列并提供详细信息

    Click on “Add queue” button

    点击“添加队列”按钮

Spring AMQP RabbitMQ服务器设置 (Spring AMQP RabbitMQ Server Setup)

We need to do the following setup to develop Spring AMQP Messaging application with RabbitMQ Server.

我们需要执行以下设置来使用RabbitMQ Server开发Spring AMQP Messaging应用程序。

  1. Install Erlang and RabbitMQ Server (Please refer previous section).

    安装Erlang和RabbitMQ Server(请参阅上一节)。
  2. Access Rabbit MQ Admin console

    访问Rabbit MQ管理控制台
  3. Access Rabbit MQ Admin console by using https://localhost:15672/

    通过使用https:// localhost:15672 /访问Rabbit MQ管理控制台

    Default login details: guest/guest

    默认登录详细信息:访客/访客

  4. Configure Exchange and Queue in RabbitMQ Server

    在RabbitMQ服务器中配置Exchange和队列
  5. Create queue = “tpQueue”

    创建队列=“ tpQueue”

    Click on “Add queue” button

    点击“添加队列”按钮

    Create an Exchange and map it to previously created Queue

    创建一个Exchange并将其映射到以前创建的队列

    Click on “Add exchange” button

    点击“添加交易所”按钮

    Click on “tpExchange”

    点击“ tpExchange”

    Then map “tpExchange” with “tpQueue” with some routing key

    然后通过路由键将“ tpExchange”与“ tpQueue”映射

    Click on “Bind” button

    点击“绑定”按钮

Now it’s time to start Developing Spring AMQP RabbitMQ Messaging Application!

现在是时候开始开发Spring AMQP RabbitMQ消息传递应用程序了!

That’s it all about Spring AMQP RabbitMQ Installation and setup process. We will discuss and develop Spring AMQP RabbitMQ Messaging Example in my coming posts.

这就是Spring AMQP RabbitMQ安装和设置过程的全部内容。 我们将在我的后续文章中讨论和开发Spring AMQP RabbitMQ消息传递示例。

Further Reading: Spring AMQP RabbitMQ Example, Apache ActiveMQ

进一步阅读: Spring AMQP RabbitMQ示例Apache ActiveMQ

Reference: Official Website

参考: 官方网站

翻译自: https://www.journaldev.com/11655/spring-rabbitmq

兔子mq框架

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值