activemq 实战二 连接到ActiveMQ-Connecting to ActiveMQ
The main role of a JMS broker such as ActiveMQ is to provide a communication
infrastructure for client applications. For that reason, ActiveMQ provides connectors,
a connectivity mechanism that provides client-to-broker communications (using
transport connectors) as well as broker-to-broker communications (using network
connectors). ActiveMQ allows client applications to connect using a variety of protocols,
but also allows other brokers to create communication channels and to
build complex networks of ActiveMQ brokers.
JMS代理(如ActiveMQ broker)的主要作用是为客户端程序提供一种通信机制.为此,ActiveMQ提供一种连接机制,
这种连接机制使用传输连接器(transport connector)实现客户端与代理(client-to-broker)之间的通信;
使用网络连接器(network connector)实现代理与代理之间的通信.
We start this chapter by explaining connector URIs, which are used to address the
broker. After that, we’ll dig into transport connectors and explain what protocols clients
can use to connect to the ActiveMQ broker.
本章中,我们从解析用于定位代理(broker)的连接器的URI入手,然后深入介绍传输连接器(transport connector)
同时也将解析客户端连接到ActiveMQ代理(broker)时使用的协议.
NOTE We use the terms connector and protocol interchangeably. Protocols
are general-purpose concepts and connectors are ActiveMQ-specific mechanisms,
but every ActiveMQ connector, as you’ll see, implements a specific
protocol and is named after it. It should be clear from the context whether
we’re talking about a protocol in general or a specific ActiveMQ connector.
注意:我们使用的术语连接器(connector)和连接协议(protocol)是可互换的.
这里说的协议是通用概念,而连接器(connector)则是ActiveMQ特有的机制.
你将看到,每一个ActiveMQ连接器(connector)都实现了一种特定的协议,并以该协议来命名.
通过上下文应该能确定我们讨论的是通用的协议还是ActiveMQ特有的连接器(connector).
This chapter covers
? A description and demonstration of ActiveMQ connector URIs
? How to connect your clients to ActiveMQ using transport
connectors
? How to create a cluster of ActiveMQ message brokers using
network
本章内容包括:
(1) ActiveMQ 连接器(connector)的URI介绍和解析
(2) 客户端如何使用传输连接器(ActiveMQ connector)连接到ActiveMQ
(3) 如何创建ActiveMQ 消息代理(broker)集群
We’ll first explain how to configure transport connectors and demonstrate it by adapting
the stock portfolio example for use over different connectors, so we can demonstrate
them later on. Then we’ll be ready to move on to specific connectors. The
various transport connectors that allow you to connect to ActiveMQ will be discussed
including TCP, SSL, and HTTP. Next, embedded brokers using the VM protocol will be
introduced.
首先,我们将修改stock portfolio实例的代码,采用不同的连接器以便说明如何配置
传输连接器(transport connector),稍后会详解各种传输连接器(transport connector).
然后我们可以转向介绍各种特定的连接器了(connector),可用来连接到ActiveMQ的各种连接器包括:
TCP连接器, SSL连接器, 和HTTP连接器.
接下来,我们还将讨论使用VM协议的嵌入式代理(embedded broker).
Finally some basic concepts of ActiveMQ clustering using network connectors will be
covered. We’ll demonstrate how you can create static networks of brokers using the
static protocol and how clients can reliably connect to the network of brokers using
the failover protocol. Dynamic networks using such protocols as multicast and discovery
will also be covered. This section will only introduce basic concepts and protocols
used for networks of brokers, whereas more information on them can be found in
chapter 10.
最后,本章还将讨论使用网络连接器(network connector)配置ActiveMQ集群的一些基本概念.
我们将讨论如何使用静态协议创建静态代理网络(network of brokers),以及客户端如何使用
容错协议(failover protocol)可靠地连接到代理网络(network of brokers).本章也会讨论
使用多点传送的动态网络.这部分主要介绍代理网络(network of brokers)的一些基本概念,
更多代理网络(network of brokers)相关的信息将在第十章介绍.
activemq 实战二 连接到ActiveMQ-Connecting to ActiveMQ的更多相关文章
- ActiveMQ实战篇之ActiveMQ实现request/reply模型(二)
ActiveMQ实战篇之ActiveMQ实现request/reply模型(二)
- spring +ActiveMQ 实战 topic selecter指定接收
spring +ActiveMQ 实战 topic selecter指定接收 queue:点对点模式,一个消息只能由一个消费者接受 topic:一对多,发布/订阅模式,需要消费者都在线(可能会导致信息 ...
- Windows Server环境下消息队列之ActiveMQ实战
环境准备 1.安装jdk1.7+ 2.下载新版ActiveMQ http://activemq.apache.org/ 3.启动activemq服务 4.启动成功后的界面是 5.启动成功后 浏览器访 ...
- ActiveMQ的作用总结(应用场景及优势)以及springboot+activeMq 实战
业务场景说明: 消息队列在大型电子商务类网站,如京东.淘宝.去哪儿等网站有着深入的应用, 队列的主要作用是消除高并发访问高峰,加快网站的响应速度. 在不使用消息队列的情况下,用户的请求数据直接写入 ...
- Java消息队列--ActiveMq 实战
1.下载安装ActiveMQ ActiveMQ官网下载地址:http://activemq.apache.org/download.html ActiveMQ 提供了Windows 和Linux.Un ...
- Spring下ActiveMQ实战
MessageQueue是分布式的系统里经常要用到的组件,一般来说,当需要把消息跨网段.跨集群的分发出去,就可以用这个.一些典型的示例就是: 1.集群A中的消息需要发送给多个机器共享: 2.集群A中消 ...
- Apache ActiveMQ实战(1)-基本安装配置与消息类型
ActiveMQ简介 ActiveMQ是一种开源的,实现了JMS1.1规范的,面向消息(MOM)的中间件,为应用程序提供高效的.可扩展的.稳定的和安全的企业级消息通信.ActiveMQ使用Apache ...
- activemq 实战 一
This chapter covers Introduction to the use case for each of the book examples Use of Maven for ...
- Centos7环境下消息队列之ActiveMQ实战
Activemq介绍 对于消息的传递有两种类型: 一种是点对点的,即一个生产者和一个消费者一一对应: 另一种是发布/订阅模式,即一个生产者产生消息并进行发送后,可以由多个消费者进行接收. JMS定义了 ...
随机推荐
- kernel headers
linux/delay延迟相关函数,长延时ssleep msleep(睡眠等待),短延时mdelay udelay(忙等待) linux/sched.h进程相关的头文件, struct task_st ...
- golang http.Redirect()函数容易误解的地方
调用http.Redirect()函数后,并不会立刻进行跳转,而是继续顺序执行函数中的所有的代码后,再进行跳转.但是Redirect后面的写界面的代码不会发送到游览器前端的. 代码如下:func Ch ...
- NODE_PATH的疑难杂症(转)
nodejs 中的 NODE_PATH 在使用 nodejs 开发中我们都免不了要去安装一些第三方模块. 那么你或多或少的遇到过以下一些问题 再继续阅读之前,我们先来弄清楚一个概念. npm inst ...
- android ndk opencv jni 编译集成
OpenCV (Open Source Computer Vision Library) https://docs.opencv.org/2.4/doc/tutorials/introduction/ ...
- ubuntu rails3.2.16 提示gem mysql adapter
把database.yml的adapter改为mysql2 把Gemfile文件中的gem mysql改为gem mysql2
- JavaScript操作XML工作记录
JavaScript操作XML (一) JavaScript操作XML是通过XML DOM来完成的.那么什么是XML DOM呢?XML DOM 是: 用于 XML 的标准对象模型 用于 XML 的标准 ...
- ajax回调函数中使用$(this)取不到对象的解决方法
如果在ajax的回调函数内使用$(this)的话,实践证明,是取不到任何对象的,需要的朋友可以参考下 $(".derek").each(function(){ $(this).cl ...
- 【转】【Linux】Linux 命令行快捷键
Linux 命令行快捷键 涉及在linux命令行下进行快速移动光标.命令编辑.编辑后执行历史命令.Bang(!)命令.控制命令等.让basher更有效率. 常用 ctrl+左右键:在单词之间跳转 ct ...
- JDK中的序列化和反序列化
题外话:诸事缠身,不知不觉距离上一篇就将近一个月了,读书不易,学习不易,唯有坚持. 写来写去始终不满意,索性贴一个比较好的文章吧! 参考: [Java基础]序列化与反序列化深入分析
- Ubuntu 12.04 root用户登录设置
Ubuntu 12.04默认是不允许root登录的,在登录窗口只能看到普通用户和访客登录.以普通身份登陆Ubuntu后我们需要做一些修改,普通用户登录后,修改系统配置文件需要切换到超级用户模式,在终端 ...