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)相关的信息将在第十章介绍.

时间: 2024-07-28 17:08:23

activemq 实战二 连接到ActiveMQ-Connecting to ActiveMQ的相关文章

ActiveMQ实战篇之ActiveMQ实现request/reply模型(二)

ActiveMQ实战篇之ActiveMQ实现request/reply模型(二) 原文地址:https://www.cnblogs.com/bincoding/p/8254113.html

ActiveMQ的作用总结(应用场景及优势)以及springboot+activeMq 实战

业务场景说明: 消息队列在大型电子商务类网站,如京东.淘宝.去哪儿等网站有着深入的应用, 队列的主要作用是消除高并发访问高峰,加快网站的响应速度. 在不使用消息队列的情况下,用户的请求数据直接写入数据库,在高并发的情况下,会对数据库造成巨大的压力,同时也使得系统响应延迟加剧. 在使用队列后,用户的请求发给队列后立即返回, (例如: 当然不能直接给用户提示订单提交成功,京东上提示:您"您提交了订单,请等待系统确认"), 再由消息队列的消费者进程从消息队列中获取数据,异步写入数据库. 由于

Spring下ActiveMQ实战

MessageQueue是分布式的系统里经常要用到的组件,一般来说,当需要把消息跨网段.跨集群的分发出去,就可以用这个.一些典型的示例就是: 1.集群A中的消息需要发送给多个机器共享: 2.集群A中消息需要主动推送,但彼此的网络不是互通的(如集群A只有过HA才能被外界访问): 当然上面的几个点,除了用MQ还有其它实现方式,但是MQ无疑是非常适合用来做这些事的.众多MQ中,ActiveMQ是比较有名气也很稳定的,它发送消息的成本非常廉价,支持Queue与Topic两种消息机制.本文主要就是讲如何在

Java消息队列--ActiveMq 实战

原文地址:http://www.cnblogs.com/jaycekon/p/6225058.html 1.下载安装ActiveMQ ActiveMQ官网下载地址:http://activemq.apache.org/download.html ActiveMQ 提供了Windows 和Linux.Unix 等几个版本,楼主这里选择了Linux 版本下进行开发. 下载完安装包,解压之后的目录: 从它的目录来说,还是很简单的: bin存放的是脚本文件 conf存放的是基本配置文件 data存放的是

Apache ActiveMQ实战(1)-基本安装配置与消息类型

ActiveMQ简介 ActiveMQ是一种开源的,实现了JMS1.1规范的,面向消息(MOM)的中间件,为应用程序提供高效的.可扩展的.稳定的和安全的企业级消息通信.ActiveMQ使用Apache提供的授权,任何人都可以对其实现代码进行修改. ActiveMQ的设计目标是提供标准的,面向消息的,能够跨越多语言和多系统的应用集成消息通信中间件.ActiveMQ实现了JMS标准并提供了很多附加的特性.这些附加的特性包括,JMX管理(java Management Extensions,即java

activemq 实战 一

This chapter covers ? Introduction to the use case for each of the book examples ? Use of Maven for compiling and running the examples ? How to use the example applications with ActiveMQ 本章内容包括: 介绍本书中所有实例的用例 使用Maven编译和运行书中实例 如何使用ActiveMQ的示例应用程序 Activ

activemq学习总结 (转)Java消息队列--ActiveMq 实战

转:https://www.cnblogs.com/jaycekon/p/6225058.html 感谢作者 ActiveMQ官网下载地址:http://activemq.apache.org/download.html ActiveMQ 提供了Windows 和Linux.Unix 等几个版本,楼主这里选择了Linux 版本下进行开发. 下载完安装包,解压之后的目录: 从它的目录来说,还是很简单的: bin存放的是脚本文件 conf存放的是基本配置文件 data存放的是日志文件 docs存放的

Python爬虫实战二之爬取百度贴吧帖子

大家好,上次我们实验了爬取了糗事百科的段子,那么这次我们来尝试一下爬取百度贴吧的帖子.与上一篇不同的是,这次我们需要用到文件的相关操作. 前言 亲爱的们,教程比较旧了,百度贴吧页面可能改版,可能代码不好使,八成是正则表达式那儿匹配不到了,请更改一下正则,当然最主要的还是帮助大家理解思路. 2016/12/2 本篇目标 1.对百度贴吧的任意帖子进行抓取 2.指定是否只抓取楼主发帖内容 3.将抓取到的内容分析并保存到文件 1.URL格式的确定 首先,我们先观察一下百度贴吧的任意一个帖子. 比如:ht

FastDFS安装使用实战二(配置篇)

FastDFS安装使用实战二(配置篇) Keywords:FastDFS.分布式文件系统.Ubuntu Author:soartju 转载请注明出处:http://soartju.iteye.com/blog/803524 FastDFS的配置文件在%FastDFS%/conf目录下,其中包括 Client.conf    客户端上传配置文件 Storage.conf    文件存储服务器配置文件 Tracker.conf    负责均衡调度服务器配置文件 http.conf        ht