blob: 99b041a0f688a911b5a77111e88e508c42304192 [file] [log] [blame]
<div class="wiki-content maincontent"><h2 id="ShouldIdeployEnterpriseIntegrationPatternsinthebrokeroranotherapplication-ShouldIdeployEnterpriseIntegrationPatternsinthebrokeroranotherapplication">Should I deploy Enterprise Integration Patterns in the broker or another application</h2>
<p>Whether you deploy the <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a> inside the ActiveMQ Broker or in a separate application depends on your requirements. </p>
<h3 id="ShouldIdeployEnterpriseIntegrationPatternsinthebrokeroranotherapplication-AdvantagesofdeployingEIPinsidethebroker">Advantages of deploying EIP inside the broker</h3>
<ul><li>Its a single JVM so less moving parts and you're less likely to forget to deploy something</li><li>if you are doing things like polling resources such as files, databases and bridging them to queues or topics then its usually more efficient to host in the broker; as there's less contention and there's no network communication between the EIP rules and the message broker as its all in the same JVM (so you can use the <a shape="rect" href="vm-transport-reference.html">VM Transport</a> to avoid network overhead.</li></ul>
<h3 id="ShouldIdeployEnterpriseIntegrationPatternsinthebrokeroranotherapplication-AdvantagesofdeployingEIPinsideaseparateapplication">Advantages of deploying EIP inside a separate application</h3>
<ul><li>its easier to deploy loads of JVMs containing the EIP routing rules to get better load balancing</li><li>you can easily change your routing rules then stop/restart applications without having to restart your broker. Having said that since ActiveMQ supports <a shape="rect" href="how-can-i-support-auto-reconnection.html">auto reconnection</a> its not such a big deal to bounce the Broker now and again to refresh routing rules. Note that at some point <a shape="rect" class="external-link" href="https://issues.apache.org/activemq/browse/CAMEL-234">Camel will support auto-reload of routing rules on the fly without having to stop and reload the JVM</a> so one day this won't be such a big benefit.</li></ul>
<h3 id="ShouldIdeployEnterpriseIntegrationPatternsinthebrokeroranotherapplication-SeeAlso">See Also</h3>
<ul><li><a shape="rect" href="should-i-deploy-the-broker-inside-my-jvm-or-appserver.html">Should I deploy the broker inside my JVM or AppServer</a></li></ul>
</div>