blob: 93d34200f4fa64819a741c5fb0c3112e0f9d6b7c [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>ActiveMQ</title>
<link rel="icon" type="image/png" href="/assets/img/favicon.png">
<link rel="stylesheet" href="/css/main.css">
<script defer src="https://use.fontawesome.com/releases/v5.0.8/js/all.js" integrity="sha384-SlE991lGASHoBfWbelyBPLsUlwY1GwNDJo3jSJO04KZ33K2bwfV9YBauFfnzvynJ" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light fixed-top">
<div class="container">
<!-- <a class="navbar-brand mr-auto" href="#"><img style="height: 50px" src="assets/img/apache-feather.png" /></a> -->
<a class="navbar-brand mr-auto" href="/"><img src="/assets/img/activemq_logo_black_small.png" style="height: 50px"/></a>
<button class="navbar-toggler ml-auto" type="button" data-toggle="collapse" data-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="ml-auto collapse navbar-collapse" id="navbarContent">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link active" href="/index.html">Home</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link" id="navbarDropdownComponents" data-target="#" href="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Components</a>
<ul class="dropdown-menu dropdown-menu-center" aria-labelledby="navbarDropdownComponents">
<div class="row">
<div class="col-12">
<ul class="multi-column-dropdown">
<li class="nav-item"><a class="dropdown-item" href="/components/classic">ActiveMQ 5</a></li>
<li class="nav-item"><a class="dropdown-item" href="/components/artemis/">ActiveMQ Artemis</a></li>
<li class="nav-item"><a class="dropdown-item" href="/components/nms">NMS Clients</a></li>
<li class="nav-item"><a class="dropdown-item" href="/components/cms">CMS Client</a></li>
</ul>
</div>
</div>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link" id="navbarDropdownCommunity" data-target="#" href="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Contact</a>
<ul class="dropdown-menu dropdown-menu-center multi-column columns-1" aria-labelledby="navbarDropdownCommunity">
<div class="row">
<div class="col-12">
<ul class="multi-column-dropdown">
<li class="nav-item"><a class="dropdown-item" href="/contact#mailing">Mailing Lists</a></li>
<li class="nav-item"><a class="dropdown-item" href="/contact#chat">Chat</a></li>
<li class="nav-item"><a class="dropdown-item" href="/contact#issues">Report Issues</a></li>
<li class="nav-item"><a class="dropdown-item" href="/contact#contributing">Contributing</a></li>
<li class="nav-item"><a class="dropdown-item" href="/security-advisories.html">Security</a></li>
</ul>
</div>
</div>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link" id="navbarDropdownTeam" data-target="#" href="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Apache</a>
<ul class="dropdown-menu dropdown-menu-center multi-column columns-1" aria-labelledby="navbarDropdownTeam">
<div class="row">
<div class="col-sm-12">
<ul class="multi-column-dropdown">
<li class="nav-item"><a class="dropdown-item" href="https://www.apache.org">The Apache Software Foundation</a></li>
<li class="nav-item"><a class="dropdown-item" href="https://www.apache.org/licenses/">License</a></li>
<li class="nav-item"><a class="dropdown-item" href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
<li class="nav-item"><a class="dropdown-item" href="https://www.apache.org/foundation/thanks.html">Thanks</a></li>
<li class="nav-item"><a class="dropdown-item" href="/security-advisories.html">Security</a></li>
<li class="nav-item"><a class="dropdown-item" href="https://www.apache.org/events/current-event">Events</a></li>
<li class="nav-item"><a class="dropdown-item" href="https://people.apache.org/phonebook.html?pmc=activemq">PMC & Committers</a></li>
<li class="nav-item"><a class="dropdown-item" href="/team/reports">Board Reports</a></li>
</ul>
</div>
</div>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<div class="content">
<div class="page-title-activemq5">
<div class="container">
<h1>Initial Configuration</h1>
</div>
</div>
<div class="container" >
<div class="row" style="margin-top: 30px">
<div class="col-12 activemq5">
<p><a href="using-activemq">Using ActiveMQ</a> &gt; <a href="initial-configuration">Initial Configuration</a></p>
<h1 id="initial-configuration">Initial Configuration</h1>
<p>Firstly you need to add the jars to your classpath.</p>
<h2 id="required-jars">Required JARs</h2>
<p>To make ActiveMQ easy to use, the default <strong>activemq-all.jar</strong> comes complete with all the libraries required. If you prefer to have explicit control over all the jars used by ActiveMQ here is the full list of individual jars required</p>
<ul>
<li>activemq-broker.jar</li>
<li>activemq-client.jar</li>
<li>activeio-core.jar</li>
<li>activemq-kahadb-store.jar (if you wish to use persistence)</li>
<li>slf4j-api.jar</li>
<li>J2EE APIs which could be the j2ee.jar from Sun or your J2EE container or you could use Geronimo’s freely distributable geronimo-spec-j2ee.jar. If you are inside a servlet container and being dependent on the j2ee.jar causes you troubles, the parts of the J2EE jar we are dependent on are as follows…
<ul>
<li>geronimo-spec-jms.jar</li>
<li>geronimo-spec-jta.jar</li>
<li>geronimo-spec-j2ee-management.jar</li>
</ul>
</li>
</ul>
<p>If you want to grab a J2EE specification jar we recommend the Apache <a href="https://dist.apache.org/repos/dist/release/geronimo/">repository</a></p>
<h2 id="optional-jars">Optional JARS</h2>
<ul>
<li>spring.jar - if you wish to use the XML configuration file for configuring the Message Broker</li>
<li>if you wish to use message persistence then you need to add a persistent jar to your classpath (see below). If you just want a lightweight message bus with no durability you can leave this step out but we highly recommend persistence for production deployments.</li>
</ul>
<h2 id="persistence-support">Persistence Support</h2>
<p>We support persistence via <a href="persistence">Specialized KahaDB file system message store or JDBC</a>. For full explict control over configuration check out the <a href="xml-configuration">Xml Configuration</a>. If you wish to use KahaDB, include kahadb.jar in your classpath. In case of JDBC you’ll need to include appropriate database driver.</p>
<p>If you’re just doing some testing or in-VM SEDA based messaging you may wish to disable persistence. You can use the <a href="xml-configuration">Xml Configuration</a> for this.</p>
<p>In 5.x you can do this by setting the <code class="highlighter-rouge">persistent=false</code> property to false either in the <a href="xml-configuration">Xml Configuration</a> or on the <a href="configuring-transports">broker URL</a>.</p>
<h2 id="next-steps">Next steps</h2>
<p>One of the first things you might want to do is <a href="run-broker">start a broker</a>. Once you have a broker running you could try some <a href="examples">example programs</a></p>
<p>If you want to write your own application, you can just instantiate an <a href="http://activemq.apache.org/maven/activemq-core/apidocs/org/apache/activemq/ActiveMQConnectionFactory.html">ActiveMQConnectionFactory</a>, configure its properties directly and then you’re ready to use the standard JMS API to create Connections, Sessions, MessageProducer and MessageConsumer instances.</p>
<p>You can also take a look at our <a href="https://svn.apache.org/repos/asf/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/">unit tests</a> for more examples on how to use ActiveMQ.</p>
<h2 id="additional-resources">Additional Resources</h2>
<h3 id="related-reading">Related Reading</h3>
<ul>
<li>Sun’s <a href="http://java.sun.com/products/jms/tutorial/">JMS Tutorial</a> is a handy place to start looking at how to use the JMS API directly</li>
<li>The ActiveMQ <a href="http://activemq.apache.org/">Website</a> for specifics on how to use ActiveMQ</li>
<li><a href="topologies">ActiveMQ Topologies</a></li>
<li><a href="clustering">ActiveMQ Clustering</a></li>
<li><a href="networks-of-brokers">ActiveMQ Network of Brokers</a></li>
<li><a href="http://www.eecs.harvard.edu/~mdw/proj/seda/">Staged Event Driven Architecture (SEDA)</a></li>
</ul>
<h3 id="specifications">Specifications</h3>
<ul>
<li><a href="http://java.sun.com/j2ee/connector/">Java Connector Architecture 1.5</a></li>
<li><a href="http://java.sun.com/products/jms/index.jsp">Java Messaging Service</a></li>
</ul>
<h3 id="related-open-source-projects">Related open source projects</h3>
<ul>
<li><a href="http://camel.apache.org">Apache Camel</a></li>
<li><a href="http://geronimo.apache.org/">Apache Geronimo</a></li>
<li><a href="http://www.hermesjms.com/">Hermes JMS</a></li>
<li><a href="http://stomp.github.com/">Stomp</a> is an open wire protocol (similar to HTTP) for communicating with MOMs from different languages. It has clients for languages like C, C#, Python, Perl, Ruby etc.</li>
<li><a href="http://xbean.org/">XBean</a> is used as the default XML configuration mechanism for ActiveMQ</li>
</ul>
</div>
</div>
</div>
</div>
<div class="row sitemap">
<div class="col-sm-12">
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="row">
<div class="col-sm-3">
<div >
<img class="float-left" style="max-height: 100px" src="/assets/img/activemq_logo_white_vertical_small.png"/>
</div>
</div>
<div style="text-align: center; margin-bottom: 0px; margin-top: 30px; font-size: 65%" class="col-sm-6">
<p>Apache ActiveMQ, ActiveMQ, ActiveMQ Artemis, Apache, the Apache feather logo, and the Apache ActiveMQ project logo are trademarks of The Apache Software Foundation. Copyright &copy; 2019, The Apache Software Foundation. Licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License 2.0</a>.</p>
</div>
<div class="col-sm-3">
<div >
<a href="https://www.apache.org"><img class="float-right" style="margin-top: 10px; max-height: 80px" src="/assets/img/apache-logo-small.png"/></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>