文档章节

Running Multiple ActiveMQ Instances on One Machine

大圈
 大圈
发布于 2015/07/24 09:56
字数 398
阅读 18
收藏 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

没有更多内容

加载失败,请刷新页面

加载更多

Ubuntu常用操作

查看端口号 netstat -anp |grep 端口号 查看已使用端口情况 netstat -nultp(此处不用加端口号) netstat -anp |grep 82查看82端口的使用情况 查找被占用的端口: netstat -tln netstat -tl...

hc321
昨天
0
0
网站cdn的静态资源突然访问变的缓慢,问题排查流程

1.首先我查看了一下是否自己的网络问题,通过对比其他资源的访问速度和下载速度,确认不是 2.通过ping 和 tracert 判断cdn域名能否正常访问,(最后回想感觉这一步可以省略,因为每次最终能访...

小海bug
昨天
0
0
Mybatis 学习笔记四 MyBatis-Plus插件

Mybatis 学习笔记四 MyBatis-Plus插件 maven依赖 <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus</artifactId> <ve......

晨猫
昨天
2
0
小白带你认识netty(二)之netty服务端启动(下)

承接上一篇小白带你认识netty(二)之netty服务端启动(上),还剩下两步骤:3、注册Selector:将Channel注册到Selector上 和 4、端口的绑定:服务端端口的监听。 3、注册Selector:将Chann...

天空小小
昨天
0
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部