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
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Dynamic Forms With Camunda and Spring StateMachine
  • Structured Logging in Spring Boot 3.4 for Improved Logs
  • Symbolic and Connectionist Approaches: A Journey Between Logic, Cognition, and the Future Challenges of AI
  • Power of Azure B Series Virtual Machines

Trending

  • Can You Run a MariaDB Cluster on a $150 Kubernetes Lab? I Gave It a Shot
  • Unlocking Data with Language: Real-World Applications of Text-to-SQL Interfaces
  • Driving DevOps With Smart, Scalable Testing
  • Dropwizard vs. Micronaut: Unpacking the Best Framework for Microservices
  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.4K 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

  • Dynamic Forms With Camunda and Spring StateMachine
  • Structured Logging in Spring Boot 3.4 for Improved Logs
  • Symbolic and Connectionist Approaches: A Journey Between Logic, Cognition, and the Future Challenges of AI
  • Power of Azure B Series Virtual Machines

Partner Resources

×

Comments
Oops! Something Went Wrong

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

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

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 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!