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
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Every Generation Fears the Machine. Here Is How the AI Job Panic Usually Ends
  • Machine Identity Debt
  • Machine Identity Debt: Why Human Identity Is No Longer Cloud Security's Primary Boundary
  • Goodbye, Skeleton Keys: Why Machine Identity Broke IAM, and What SPIFFE Is Doing About It

Trending

  • Evals in CI: How to Catch Agent Regressions Before Production Does
  • Closing the Drift Loop: An AI Agent That Drafts Terraform Fixes
  • Batching Strategies: Throughput vs Latency in Practice
  • Designing Frontend Applications for Failure, Not Just Success

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  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$$
·
Jan. 24, 14 · Interview
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
18.0K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

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

  • Every Generation Fears the Machine. Here Is How the AI Job Panic Usually Ends
  • Machine Identity Debt
  • Machine Identity Debt: Why Human Identity Is No Longer Cloud Security's Primary Boundary
  • Goodbye, Skeleton Keys: Why Machine Identity Broke IAM, and What SPIFFE Is Doing About It

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • 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