Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Integrate Red Hat Fuse 7 on Apache Karaf with Red Hat AMQ 7

June 2, 2021
Chandra Shekhar Pandey
Related topics:
APIsContainersJava
Related products:
Streams for Apache KafkaRed Hat Fuse

Share:

    In this article, I will demonstrate how to use Apache Camel applications in Red Hat Fuse 7.8 to produce and consume messages from Red Hat AMQ 7 or its upstream project, Apache ActiveMQ Artemis. This approach uses AMQ Core Protocol Java Message Service (JMS). Users who want to migrate from Red Hat Fuse 6 and Red Hat AMQ 6 to Red Hat Fuse 7 and Red Hat AMQ 7 will also find this tutorial helpful.

    Set up the ActiveMQ Artemis broker

    Here are the steps to set up the ActiveMQ Artemis broker:

    1. Download Apache Artemis. At the time of writing this article, apache-artemis-2.17.0-bin.zip is the latest version.
    2. Unzip this distribution. Create a folder called apache-artemis-2.17-instance in parallel to the unzipped folder, as shown in the following example:
      
      $ ls -ltr|grep artemis
      drwxr-xr-x. 7 chandrashekhar chandrashekhar 4096 Feb 11 12:21 apache-artemis-2.17.0
      -rw-r--r--. 1 chandrashekhar chandrashekhar 63489635 Apr 24 21:23 apache-artemis-2.17.0-bin.zip
      drwxr-xr-x. 2 chandrashekhar chandrashekhar 4096 Apr 24 21:26 apache-artemis-2.17-instance
      
      $ cd apache-artemis-2.17-instance
      
      $ ../apache-artemis-2.17.0/bin/artemis create artemis_instance_1 --user admin --password admin
      Creating ActiveMQ Artemis instance at: /mnt/79fece0c-d480-4c54-8268-eaf9ce6ba53d/Development_SSD/AMQ_RH/apache-artemis-2.17-instance/artemis_instance_1
      
      --allow-anonymous | --require-login: is a mandatory property!
      Allow anonymous access?, valid values are Y,N,True,False
      N
      
      Auto tuning journal ...
      done! Your system can make 62.5 writes per millisecond, your journal-buffer-timeout will be 16000
      
      You can now start the broker by executing:
      
      "/mnt/79fece0c-d480-4c54-8268-eaf9ce6ba53d/Development_SSD/AMQ_RH/apache-artemis-2.17-instance/artemis_instance_1/bin/artemis" run
      
      Or you can run the broker in the background using:
      
      "/mnt/79fece0c-d480-4c54-8268-eaf9ce6ba53d/Development_SSD/AMQ_RH/apache-artemis-2.17-instance/artemis_instance_1/bin/artemis-service" start
      
      $ ls -ltr
      total 4
      drwxrwxr-x. 8 chandrashekhar chandrashekhar 4096 Apr 24 21:37 artemis_instance_1
      
    3. Add the following acceptor in apache-artemis-2.17-instance/etc/broker.xml and save the file. Certificates are located in the example GitHub repo:
      <acceptors>
      ---
      <acceptor name="netty-ssl-acceptor">tcp://localhost:61621?sslEnabled=true;keyStorePath=/home/chandrashekhar/certificates/activemq.example.keystore;keyStorePassword=activemqexample</acceptor>
      ---
      </acceptors>
    4. Don't forget to modify the keystore path. Then, start the broker from the location apache-artemis-2.17-instance/bin:
      $ ./artemis run
      
      # we will see logs like
      
      2021-04-24 21:56:07,978 INFO [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server
      ----
      ----
      2021-04-24 21:56:08,900 INFO [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at localhost:61621 for protocols [CORE,MQTT,AMQP,HORNETQ,STOMP,OPENWIRE]
      ----
      ----
      2021-04-24 21:56:08,920 INFO [org.apache.activemq.artemis.core.server] AMQ221007: Server is now live
      2021-04-24 21:56:08,920 INFO [org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis Message Broker version 2.17.0 [0.0.0.0, nodeID=c6090ffc-a519-11eb-a4d5-b0fc366fae1f]

    Set up Red Hat Fuse on Karaf

    Next, set up Red Hat Fuse on Karaf:

    1. Download Red Hat Fuse and select the Karaf installer. At the time of writing this article, Red Hat Fuse 7.8 is the latest version.
    2. Unzip the file and run it from the bin folder:
      $ cd fuse-karaf-7.8.0.fuse-780038-redhat-00001/bin
      $./fuse
    3. You can use the mvn clean install command to build the application. The application code and certificates are located in the example GitHub repository.
    4. Modify the Camel route as per our requirements. Don't forget to update the truststore path. We are using Camel's Java Message Service (JMS) component with the Artemis connection factory (ActiveMQJMSConnectionFactory).
    5. In the Karaf console, install the following features and applications:
      karaf@root()> features:install pax-jms-artemis
      karaf@root()> features:install pax-jms-pool-pooledjms
      karaf@root()> features:install camel-jms
      karaf@root()> install -s mvn:com.mycompany/karafArtemis/1.0.0-SNAPSHOT
    6. In the Red Hat Fuse logs, you will see the following entries:
      [chandrashekhar@localhost log]$ tail -f fuse.log
      2021-04-24 22:40:59,731 | INFO | sConsumer[someQueue] | consume_message | 64 - org.apache.camel.camel-core - 2.23.2.fuse-780036-redhat-00001 | message 20210424 10:40
      2021-04-24 22:41:59,729 | INFO | sConsumer[someQueue] | consume_message | 64 - org.apache.camel.camel-core - 2.23.2.fuse-780036-redhat-00001 | message 20210424 10:41
      2021-04-24 22:42:59,734 | INFO | sConsumer[someQueue] | consume_message | 64 - org.apache.camel.camel-core - 2.23.2.fuse-780036-redhat-00001 | message 20210424 10:42
    7. In Artemis, we can check the queue statistics from the bin folder of the broker instance:
      $ pwd
      /path/to/apache-artemis-2.17-instance/artemis_instance_1/bin
      
      $ [chandrashekhar@localhost bin]$ ./artemis queue stat --user admin --password admin
      Connection brokerURL = tcp://localhost:61616
      |NAME |ADDRESS |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE |
      |someQueue |someQueue |1 |0 |18 |0 |18 |0 |ANYCAST |
      [chandrashekhar@localhost bin]$

    Conclusion

    That's it! I hope you found this article interesting and helpful. You can find more details about these technologies at the following links:

    • Apache ActiveMQ Artemis
    • Apache Camel
    • Apache Camel JMS component
    Last updated: June 14, 2023

    Related Posts

    • Message broker integration made simple with Red Hat Fuse

    • How to configure a JDBC Appender for Red Hat Fuse 7 with Karaf

    • HTTP-based Kafka messaging with Red Hat AMQ Streams

    • Call an existing REST service with Apache Camel K

    • JMS 2.0 on Kubernetes with Apache ActiveMQ

    Recent Posts

    • Supercharging AI isolation: microVMs with RamaLama & libkrun

    • Simplify multi-VPC connectivity with amazon.aws 9.0.0

    • How HaProxy router settings affect middleware applications

    • Fly Eagle(3) fly: Faster inference with vLLM & speculative decoding

    • Kafka Monthly Digest: June 2025

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue