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
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
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

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • Power of Azure B Series Virtual Machines
  • Why ChatGPT Is Not as Intelligent as Many Believe
  • Microsoft Azure Virtual Machine
  • 2-Tier Architecture vs 3-Tier Architecture in DBMS

Trending

  • Running Unit Tests in GitHub Actions
  • Modular Software Architecture: Advantages and Disadvantages of Using Monolith, Microservices and Modular Monolith
  • Exploring the Evolution and Impact of Computer Networks
  • Harnessing the Power of In-Memory Databases: Unleashing Real-Time Data Processing
  1. DZone
  2. Data Engineering
  3. AI/ML
  4. Running Multiple ActiveMQ Instances on One Machine

Running Multiple ActiveMQ Instances on One Machine

$$anonymous$$ user avatar by
$$anonymous$$
·
Jan. 24, 14 · Interview
Like (1)
Save
Tweet
Share
16.14K 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

  • Power of Azure B Series Virtual Machines
  • Why ChatGPT Is Not as Intelligent as Many Believe
  • Microsoft Azure Virtual Machine
  • 2-Tier Architecture vs 3-Tier Architecture in DBMS

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • 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: