DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Beyond Fail-Safe: Designing Fail-Operational State Machines for Physical AI
  • Series (4/4): Toward a Shared Language Between Humans and Machines — Humans as Co-Creators: Ethics, Strategy, and the Future of a Shared Language
  • Series (3/4): Toward a Shared Language Between Humans and Machines — Quantum Language and the Limits of Simulation
  • Series (2/4): Toward a Shared Language Between Humans and Machines — From Multimodality to World Models: Teaching Machines to Experience

Trending

  • Skills, Java 17, and Theme Accents
  • Data Contracts as the "Circuit Breaker" for Model Reliability
  • Optimizing High-Volume REST APIs Using Redis Caching and Spring Boot (With Load Testing Code)
  • Building a DevOps-Ready Internal Developer Platform: A Hands-On Guide to Golden Paths, Self-Service, and Automated Delivery Pipelines
  1. DZone
  2. Data Engineering
  3. AI/ML
  4. Running Multiple ActiveMQ Instances on One Machine

Running Multiple ActiveMQ Instances on One Machine

By 
$$anonymous$$ user avatar
$$anonymous$$
·
Jan. 24, 14 · Interview
Likes (1)
Comment
Save
Tweet
Share
17.8K Views

Join the DZone community and get the full member experience.

Join For Free

a few weeks ago i started making use of apache activemq again as the jms provider 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.


apache-activemq-logo
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

screenshot 2014-01-18 08.52.39
now you have two instances running next to each other and can start testing the ‘advanced’ functions of activemq.


Machine

Published at DZone with permission of $$anonymous$$. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Beyond Fail-Safe: Designing Fail-Operational State Machines for Physical AI
  • Series (4/4): Toward a Shared Language Between Humans and Machines — Humans as Co-Creators: Ethics, Strategy, and the Future of a Shared Language
  • Series (3/4): Toward a Shared Language Between Humans and Machines — Quantum Language and the Limits of Simulation
  • Series (2/4): Toward a Shared Language Between Humans and Machines — From Multimodality to World Models: Teaching Machines to Experience

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook