文档章节

Running Multiple ActiveMQ Instances on One Machine

大圈
 大圈
发布于 2015/07/24 09:56
字数 398
阅读 17
收藏 0

The Integration Zone is brought to you in partnership with WSO2. Learn more about WSO2's API Management by watching their on-demand webinar.

A few weeks ago I started making use of Apache ActiveMQ again as the JMSprovider with my Mule ESB solution. Since it had been a few years that I used ActiveMQ I thought it would be nice to check out some of the (new) features like the failover transport and other clustering features. To be able to test these last things I needed multiple installations of ActiveMQ on my machine. Luckily this isn’t very hard to accomplish, although the documentation on this on the ActiveMQ site is quite minimal.



The first step is to download and unzip the ActiveMQ package, which I did at ~/develop/apache-activemq-5.8.0.

To create the instances I go to the activeMQ home directory and use the ‘create’ command like this:

cd develop/apache-activemq-5.8.0/
./bin/activemq create instanceA
./bin/activemq create instanceB

Now if you do a ‘ls -l’ you will see that there are two subdirectories created, ‘instanceA’ and ‘instanceB’. Since both instances will make use of the default ports we have to modify the config for the second instance. Go to the directory ‘develop/apache-activemq-5.8.0/instanceB/conf’ and open the file ‘jetty.xml’ to make the webconsole available at port ’8162′ by modifying the following line:

<bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector">
  <property name="port" value="8162" />
</bean>

Next open the file ‘activemq.xml’ in the same directory and modify the following part:

<transportConnectors>
  <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
  <transportConnector name="openwire" uri="tcp://0.0.0.0:61617?maximumConnections=1000&wireformat.maxFrameSize=104857600"/>
  <transportConnector name="amqp" uri="amqp://0.0.0.0:5673?maximumConnections=1000&wireformat.maxFrameSize=104857600"/>
 </transportConnectors>

That’s it! Make sure both files are saved and start the first instance with:

cd ~/develop/apache-activemq-5.8.0/instanceA/bin
./instanceA console

Open up a new console and run the commands:

cd /Users/pascal/develop/apache-activemq-5.8.0/instanceB/bin
./instanceB console


Now you have two instances running next to each other and can start testing the ‘advanced’ functions of ActiveMQ.


The Integration Zone is brought to you in partnership with WSO2. Learn more about WSO2's API Management by watching their on-demand webinar.

Published at DZone with permission of Pascal Alma, DZone MVB. (source)

Opinions expressed by DZone contributors are their own.


本文转载自:https://dzone.com/articles/running-multiple-active

共有 人打赏支持
大圈
粉丝 4
博文 57
码字总数 21291
作品 0
朝阳
系统管理员
Win7环境下安装ActiveMQ

参考ActiveMQ官方文档:http://activemq.apache.org/getting-started.html 安装ActiveMQ 近来要学习JMS,在网上查了些资料,发现ActiveMQ是比较流行的JMS开源框架,决定使用ActiveMQ来学习J...

纠结名字
2015/08/09
0
0
ActiveMQ安装配置和使用简例

本文作者:Zhang Phil 原文链接:http://blog.csdn.net/zhangphil/article/details/48173665 ActiveMQ安装配置和使用简例 ActiveMQ是一套JMS(Java Message Service)开源消息服务实现的组件...

开开心心过
2015/09/02
0
0
Linux 安装ActiveMQ(使用Mac远程访问)

阅读本文需要安装JDK 一 ActiveMQ简介 activemq是用java语言编写的一款开源消息总线 activemq是apache出品 activemq消息的传递有两种类型 一种是点对点(即一个生产者和一个消费者一一对应) 另...

梦三
07/15
0
0
ActiveMQ 5.15.x Release安装和配置--Linux篇

阅读目录: 1. 关闭防火墙和Selinux 2. 下载并安装ActiveMQ 5.15.x Release版本 3. 启动并验证 4.配置ActiveMQ 5.15.x Release自启动 5.注意事项以及说明 1. 关闭防火墙和Selinux Linux的防火...

loubobooo
2017/11/26
0
0
ActiveMQ集群方案(下)

版权声明:欢迎转载,但是看在我辛勤劳动的份上,请注明来源:http://blog.csdn.net/yinwenjie(未经允许严禁用于商业用途!) https://blog.csdn.net/yinwenjie/article/details/51205822 目...

yunlielai
04/15
0
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

python3.6 取整除法

python3.6 中取整除法运算逻辑如下: d 非零,那么商 q 满足这样的关系: a = qd + r ,且0 ≤ r n1=7//3#7 = 3*2 +1n2=-6.1//3#-7 = 3*(-3)+2'{},{}'.format(n1,n2) 从运行结果可以...

colinux
27分钟前
3
0
阶段总结——用虚拟机搭建一个高可用负载均衡集群架构

[toc] linux基本知识已经介绍完,现有一个业务需要操作,通过对这个项目的操作,可以复习、总结、巩固之前的知识点; ** 用13台虚拟机搭建一个高可用负载均衡集群架构出来,并运行三个站点,...

feng-01
30分钟前
0
0
mysql 设置utf8字符集 (CentOS)

1.查看数据库及mysql应用目前使用的编码方式 (1)链接mysql 客户端 (2)执行:status 结果: 2.修改mysql 应用的字符编码(server characterset ) (1)打开配置文件:vim /etc/mysql/my...

qimh
31分钟前
0
0
windows无法格式化u盘解决方法

1。点开始-运行-输入cmd-format f: /fs: fat32 (这里f:是指U盘所在盘符) 这个格式化会很慢 请耐心等待

大灰狼wow
42分钟前
0
0
MySql 8.0连接失败

原来,MySql 8.0.11 换了新的身份验证插件(caching_sha2_password), 原来的身份验证插件为(mysql_native_password)。而客户端工具Navicat Premium12 中找不到新的身份验证插件(caching_s...

放飞E梦想O
59分钟前
1
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部