Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
titleactivemq.xml customization: protocol support
linenumberstrue
<transportConnectors>
  <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
  <transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
</transportConnectors>


Each transportConnector supports many additional options that can be added to this configuration.

...

Another popular deployment option is Karaf, which is a light-weight OSGi-based JVM container. Karaf has the advantage of supporting hot code swapping, which allows you to make sure that your routes are always running. It  It also allows you to deploy XML-based routes (Spring or Blueprint) by simply copying the files into a $KARAF_HOME/deploy directory. If deploying camel routes to Karaf, Blueprint-based routes have some advantages over the Spring-based DSL, particularly in terms of being able to use property placeholders within your routes.

Karaf can be set up by:

  1. downloading Karaf from an apache.org mirror
  2. running ./bin/karaf to enter the shell
  3. installing required services:

    Code Block
    languagebash
    titleKaraf console
    $> feature:repo-add camel 2.14.0
    $> feature:repo-add activemq 5.10.0
    $> feature:install camel
    $> feature:install activemq-camel
    
    # display available camel features
    $> feature:list | grep camel
    
    # install camel features, as needed
    $> feature:install camel-http4
  4. setting up a service wrapper (so that karaf is always runningruns as a system-level service)

    Code Block
    languagebash
    titleKaraf console
    $> feature:$> feature:install wrapper
    $> wrapper:install
  5. following the directions provided by this command

Now, routes can be deployed (and re-deployed) by simply copying JAR files or XML documents to $KARAF_HOME/deploy.

Monitoring Your Camel Routes

It is often useful to keep runtime statistics for your camel routes. Hawtio is a web console for monitoring your messaging infrastructure, and it can be deployed in any JVM container, including Karaf, Tomcat or Jetty.

In Karaf, hawtio can be installed like so:

 

Code Block
languagebash
titleKaraf console
$> feature:repo-add hawtio 1.4.29
$> feature:install hawtio

Once deployed, hawtio is available at http://localhost:8181/hawtio/