- JBoss Fuse Tutorial
- JBoss Fuse – Home
- JBoss Fuse - Introduction To ESB
- What Is Fuse?
- JBoss Fuse – Apache Karaf
- JBoss Fuse – Apache Camel
- JBoss Fuse – Camel Concepts
- JBoss Fuse – Apache CXF
- JBoss Fuse – Rest Web Services
- JBoss Fuse – Apache AMQ
- JBoss Fuse – AMQ With Camel
- JBoss Fuse – Fabric
- JBoss Fuse – Child Container
- JBoss Fuse – Issues and Solutions
- JBoss Fuse Useful Resources
- JBoss Fuse - Quick Guide
- JBoss Fuse - Useful Resources
- JBoss Fuse - Discussion
JBoss Fuse - Apache AMQ
In this chapter, we will get to know about ActiveMQ and how it acts as a broker of messages to allow applications to communicate with each other.
What is AMQ?
ActiveMQ is an open source message broker written in Java. It’s fully compliant with JMS 1.1 standards.
JMS is a specification that allows development of message based system. ActiveMQ acts as a broker of messages which sits in between applications and allows them to communicate in asynchronous and reliable way.
Types of Messaging
There are two types of messaging options explained below for better understanding.
Point to Point
In this type of communication, the broker sends messages to only one consumer, while the other consumers will wait till they get the messages from the broker. No consumer will get the same message.
If there are no consumers, the Broker will hold the messages till it gets a consumer. This type of communication is also called as Queue based communication where the Producer sends messages to a queue and only one consumer gets one message from the queue. If there is more than one consumer, they may get the next message but they won’t get the same message as the other consumer.
Publish/Subscribe
In this type of communication, the Broker sends same copy of messages to all the active consumers. This type of communication is also known as Topic based communication where broker sends same message to all active consumer who has subscribed for particular Topic. This model supports one-way communication where no verification of transmitted messages is expected.
Creating Queue and Topics
Fuse comes bundled with ActiveMQ. We can access ActiveMQ using FMC console (the browser based interface to work with AMQ).
Login to FMC using localhost:8181 and select ActiveMQ tab.
- Click on +Create
- Enter Queue/Topic name
- Select Queue/Topic from radio button
- Click on Create Queue/Create topic
Now you should be able to see the TestQ created under root → Queue →
To check the topic created follow root → Topic.
Browsing /Deleting Contents of the Queue
Login to FMC using localhost:8181
Select ActiveMQ tab
Root → Queue → TestQ <select queue that you want to browse> → Browse
- To check contents of this message, click on that particular message.
You can delete a particular message by clicking on the Delete button shown on the top right corner