【原创】RabbitMQ 之 HTTP server 插件(翻译)

HTTP server plugin 
HTTP 服务器插件 

The rabbitmq-mochiweb plugin provides hosting for other plugins that have HTTP interfaces. It allows these interfaces to co-exist on one or more HTTP listeners. 
rabbitmq-mochiweb 插件可以为其他拥有 HTTP 接口到插件提供 hosting 功能。允许这些接口并存与一个或者多个 HTTP listener。 

Configuration 
配置方式 

Plugins using rabbit mq-mochiweb typically take a listener configuration item to configure their listening HTTP port. In this page we will give examples for the rabbitmq_management application, but the same configuration can be applied to rabbitmq_jsonrpc and rabbitmq_web_stomp_examples. 
使用 rabbitmq-mochiweb 的插件,典型配置为通过一个 listener 配置条目配置 HTTP 监听端口。在这里,我们将通过 rabbitmq_management 应用作为示例进行说明,同样的配置可以应用到 rabbitmq_jsonrpc 和 rabbitmq_web_stomp 到例子上。 

The listener configuration item can contain the following keys: 
listener 配置条目可以包含以下 key 值: 

  • port (mandatory)
  • ip (to listen on only one interface)
  • ssl (to enable SSL)
  • ssl_opts (to configure SSL)

Listening on a single interface 
仅监听单独一个接口 

Use ip to specify an interface for mochiweb to bind to (giving an IP address as a string or tuple). For example: 
可以使用 ip 来指定 mochiweb 要绑定的接口(以字符串或者元组的形式给出 IP 地址),例如: 

?


1

2

3

4

5

6

[{rabbitmq_management,

  [{listener, [{port, 15672},

               {ip, "127.0.0.1"}

              ]}

  ]}

].

SSL 

Set ssl to true to turn on SSL for a listener. Use ssl_opts to specify SSL options. These are the standard Erlang SSL options - see the main page on SSL for more information. 
设置 ssl 为 true 可以将一个 listener 设置为支持 SSL 。通过 ssl_opts 可以指定 SSL 选项。这些选项均为标准 Erlang SSL 选项 - 详见 SSL 的 man 页。 

For convenience, if you do not specify ssl_opts then rabbitmq-mochiweb will use the same options as the main RabbitMQ server does for AMQP over SSL, but with client certificate verification turned off. If you wish to use client certificate verification, specify ssl_opts explicitly. 
在简单使用时,如果你没有设置 ssl_opts,那么 rabbitmq-mochiweb 将使用和 RabbitMQ 服务器针对 AMQP over SSL 同样的选项,但是关闭了客户端证书验证机制。如果你希望使用客户端证书验证机制,可以显式设置 ssl_opts 内容。 

For example: 

?


1

2

3

4

5

6

7

8

9

[{rabbitmq_management,

  [{listener, [{port,     15672},

               {ssl,      true},

               {ssl_opts, [{cacertfile, "/path/to/cacert.pem"},

                           {certfile,   "/path/to/cert.pem"},

                           {keyfile,    "/path/to/key.pem"}]}

              ]}

  ]}

].

时间: 2024-12-10 05:08:56

【原创】RabbitMQ 之 HTTP server 插件(翻译)的相关文章

关闭IBM HTTP Server插件自动生成服务,以避免部署大量应用时导致Dmgr内存溢出

IBM HTTP Server插件文件plugin-cfg.xml自动生成机制在WAS的Dmgr里默认是启用的,为了避免在部署大量应用的场景中,因配置的变动而触发插件文件的自动再次生成,进而导致Dmgr内存溢出.解决方法除了直接加大Dmgr自身的JVM堆大小之外,也可以禁用掉插件自动生成机制,操作步骤如下: 1.控制台 ==>> 服务器 ==>> 服务器类型 ==>> Web服务器 ==>> 点击右边具体的<Web服务器名称> ==>>

【原创】RabbitMQ 之 SASL Authentication(翻译)

SASL Authentication RabbitMQ has pluggable support for various SASL authentication mechanisms. There are three such mechanisms built into the server: PLAIN, AMQPLAIN, and RABBIT-CR-DEMO, and one - EXTERNAL - available as a plugin. You can also implem

【原创】RabbitMQ 之 Access Control(翻译)

Access Control  When the server first starts running, and detects that its database is uninitialised or has been deleted, it initialises a fresh database with the following resources: 当服务器启动运行后,检测到所使用的数据库未进行过初始化,或者被删除了,则会使用如下资源初始化一个新的数据库:  a virtual

【原创】RabbitMQ 之 Distributed brokers(翻译)

Distributed RabbitMQ brokers  AMQP and the other messaging protocols supported by RabbitMQ via plug-ins (e.g. STOMP), are (of course) inherently distributed - it is quite common for applications from multiple machines to connect to a single broker, e

【原创】RabbitMQ 之 Dynamic Shovel(翻译)

Configuring Dynamic Shovels  Information about dynamic shovels is stored in the RabbitMQ database, along with users, permissions, queues, etc. Every shovel is defined by a corresponding named parameter. dynamic shovel 的配置信息会被保存到 Mnesia 中,信息中会包含 user,

【原创】RabbitMQ 之 Negative Acknowledgements(翻译)

Negative Acknowledgements The AMQP specification defines the basic.reject method that allows clients to reject individual, delivered messages, instructing the broker to either discard them or requeue them. Unfortunately, basic.reject provides no supp

【原创】RabbitMQ 之 Publisher Acknowledgement(翻译)

Confirms (aka Publisher Acknowledgements)       Using standard AMQP, the only way to guarantee that a message isn't lost is by using transactions -- make the channel transactional, publish the message, commit. In this case, transactions are unnecessa

【原创】rabbitmq-env.conf用户手册(翻译)

官方原文:http://www.rabbitmq.com/man/rabbitmq-env.conf.5.man.html =============== 我是分割线 ================ 名字 rabbitmq-env.conf - RabbitMQ AMQP server 的默认配置文件 描述       /etc/rabbitmq/rabbitmq-env.conf 中包含了各种设置项,可以用于覆盖在 RabbitMQ 启动脚本中默认设置的相关选项.        该文件由系统

原创jQuery弹出层插件分享_jquery

依赖jquery,兼容IE6\7\8 火狐 chrom 等主流浏览器(绝对原创), 不过请求大神帮我提升点效率. /** * jQuery弹出层插件 * * @author lanhaoooo@163.com * @since 2014-08-23 */ (function($) { var methods = { o : { isIe : !-[ 1, ] || document.documentMode >= 9,//后面的是判断IE9.IE10的 ie6 : !-[ 1, ] &&am