3. 3
JMS Basics
●
a messaging standard that allows application components
based on the Java Platform Enterprise Edition (Java EE)
to create, send, receive, and read messages. It enables
distributed communication that is loosely coupled, reliable,
and asynchronous.
●
JMS messages sent by an application are targeted to a
specific destination just like postal mail boxes and the
messages are placed in the mailbox until someone picks
them up.
4. 4
Messaging Concept
●
JMS Provider: A messaging system that implements the
JMS interfaces and provides administrative and control
features
●
Clients: Java applications that send or receive JMS
messages. A message sender is called the Producer, and
the recipient is called a Consumer
●
Messages: Objects that communicate information between
JMS clients
5. 5
Type Of Messaging
●
Point to point model
Producer sends the message to a specified queue within
JMS provider and the only one of the consumers who listening to
that queue receives that message.
7. 7
What is Apache ActiveMQ ?
●
Started in 2005 at CodeHaus
●
Message Oriented Middleware
●
Open Source
●
Apache Project
●
Apache Licenced
●
To Achieve standards-based,message oriented application
integration across many languages and platforms
●
Multl language-Multi Protocol support
●
8. 8
ActiveMQ Installation
●
Download Apache ActiveMQ from official website.
●
unzip the downloaded zip file and locate it specific folder.
●
open the command prompt.
●
go to bin directory and start ActiveMQ prompt then application
in run stats.
●
Once the ActiveMQ completes the appropriate messages will be
displayed in the console.
●
Now browser tab opened and type url:
http://localhost:8081/admin/ and username and password is
'admin'.
9. 9
JMS with Apache ActiveMQ
●
JMS API
●
Connection – client’s active connection to its JMS provider.
●
ConnectionFactory – encapsulates connection
configuration properties
●
Session - single-threaded context for producing and
consuming messages.
●
Message – root interface for JMS messages
●
MessageProducer – send messages to a destination.
●
MessageConsumer – to receive object from destination.
13. 13
Use Cases
There are many different use cases, requirements and
deployment options. Some of the main use cases are
1. Transactional messaging
2. High performance market data distribution
3. Clustering and general purpose async messaging model
4. Web Streaming of data
5. RESTful API to messaging using HTTP