SlideShare a Scribd company logo
Introduction to Apache ActiveMQ
08. 22. 2019
Wooyoung Choi
wychoi@redwood.snu.ac.kr
Real-Time Operating Systems Laboratory,
Seoul National University
2
Contents
I. Introduction
II. Java Message Service (JMS)
III. Message Oriented Middleware (MOM)
IV. ActiveMQ
V. Conclusion
Introduction to Apache ActiveMQ
3
The Goal of the Presentation
 To get a clear understanding of Apache ActiveMQ.
 ActiveMQ is
① Java Message Service (JMS) 1.1 compliant.
• ActiveMQ is implemented with JMS.
② Message Oriented Middleware (MOM) product that
provides asynchronous messaging.
I. Introduction
4
Motivation
 As a replacement for Remote Procedure Call (RPC).
RPC-synchronous calls have a limited scalability.
Backed up requests slow down the whole system.
Solution : Use asynchronous call to increase scalability.
 To achieve high availability and scalability.
The ability to continue functioning after failure of one or more
servers.
Solution : Migrate from one server to another using brokers in
event of server failure.
I. Introduction
Client server
RPC
5
Contents
I. Introduction
II. Java Message Service (JMS)
III. Message Oriented Middleware (MOM)
IV. ActiveMQ
V. Conclusion
Introduction to Apache ActiveMQ
6
Overview
 What is Java Message Service (JMS)?
JMS is a Message Oriented Middleware (MOM).
Loosely coupled communication.
Asynchronous messaging.
Reliable delivery which means high availability.
II. Java Message Service (JMS)
JMS Interface
7
Goals of JMS
 When to use JMS?
When the provider do not want the components to depend
on other components’ interfaces.
When the provider wants the application to run whether all
components are running or not.
When the provider wants a component to operate without
receiving an immediate response.
II. Java Message Service (JMS)
8
JMS Messaging Models (1)
 Point to Point
Each message has only one receiver.
Message is sent to a queue.
There is no dependency between producer and receiver.
• Producer and receiver are independent to each other.
 Publish-Subscribe
II. Java Message Service (JMS)
9
JMS Messaging Models (2)
 Point to Point
 Publish-Subscribe
Each message can have multiple receivers.
Messages are sent to Topic.
It is used when multiple receivers need to receive the same
messages.
II. Java Message Service (JMS)
10
JMS Provider: ActiveMQ
II. Java Message Service (JMS)
 Java Message Service (JMS) lets user to send
messages from one program to another.
 However, it doesn’t use direct connection.
Instead the message is sent to a JMS provider, such as
ActiveMQ, and put there in a queue.
 Summary: ActiveMQ is a JMS provider and it is
implemented with JMS.
11
Contents
I. Introduction
II. Java Message Service (JMS)
III. Message Oriented Middleware (MOM)
IV. ActiveMQ
V. Conclusion
Introduction to Apache ActiveMQ
12
Overview
 Definition
The layer, which allows programs to communicate by
sending and receiving messages.
 Objective
Message Oriented Middleware allows programmers to
integrate many heterogeneous components for software
systems.
III. Message Oriented Middleware (MOM)
13
Features of MOM: Message Queue
 MOM is implemented as a form of Message Queue.
 Message Queue’s features are
Scalability
① Broker clusters
② Multiple destinations for a publishers or subscribers.
Availability
① Broker clusters
② Master/Slave
Performance
① Memory resource management
III. Message Oriented Middleware (MOM)
14
Contents
I. Introduction
II. Java Message Service (JMS)
III. Message Oriented Middleware (MOM)
IV. ActiveMQ
V. Conclusion
Introduction to Apache ActiveMQ
15
Overview
 What is ActiveMQ?
Message Oriented Middleware (MOM)
• The layer that allows software components to interact with one
other.
ActiveMQ is the most popular open source messaging and
JMS provider developed by Apache.
IV. ActiveMQ
JMS
Compliant
16
Features
 Supports a variety of Cross Language Clients from
Java, C, C++, C#, Python, PHP.
 Designed for high performance clustering.
Network of brokers
 Supports very fast and stable persistence
Master/Slave
IV. ActiveMQ
17
Clustered Brokers improve scalability
 Networks of Brokers
It creates a cluster composed of multiple ActiveMQ
instances.
It allows brokers to communicate each other.
Consequence : It improves scalability.
IV. ActiveMQ
18
Master/Slave improves persistence (1)
 Shared-Nothing Master/Slave structure
Master and Slave have their own message storage.
Slave is connected to the master broker.
All message commands are replicated from the master.
Slave broker takes over Master broker’s task when Master
broker falls down.
IV. ActiveMQ
19
Master/Slave improves persistence (2)
 Shared-Storage Master/Slave structure
Allows many brokers to share the storage mechanism.
Only one broker can be live at any given time.
Master has a file lock and another slave takes over the lock
when the master falls down.
IV. ActiveMQ
20
Hello World Example using ActiveMQ
(1)
1. Connect Producer to broker URL (tcp://localhost:61616).
2. Send a small text message saying “Hello World”.
3. The text message is enqueued in broker URL.
4. Connect Receiver to broker URL (tcp://localhost:61616).
5. Receiver receives the text message from the queue at
broker URL.
6. The message is dequeued.
IV. ActiveMQ
21
Hello World Example using ActiveMQ
(2)
1. Connect Producer to broker URL (tcp://localhost:61616).
2. Send a small text message saying “Hello World”.
IV. ActiveMQ
①
②
22
Hello World Example using ActiveMQ
(3)
3. The text message is enqueued in broker URL.
IV. ActiveMQ
③
23
Hello World Example using ActiveMQ
(4)
4. Connect Receiver to broker URL (tcp://localhost:61616).
5. Receiver receives the text message from the queue at
broker URL.
IV. ActiveMQ
④
⑤
24
Hello World Example using ActiveMQ
(5)
6. The message is dequeued.
IV. ActiveMQ
⑥
25
Contents
I. Introduction
II. Java Message Service (JMS)
III. Message Oriented Middleware (MOM)
IV. ActiveMQ
V. Conclusion
Introduction to Apache ActiveMQ
26
Summary
 Apache ActiveMQ is
Java Message Service provider
Message Oriented Middleware
with high scalability and reliability
 Clustered Brokers
Improve scalability.
Guarantee availability.
 Master/Slave Brokers
Guarantee fast and stable persistence when one falls down.
V. Conclusion

More Related Content

What's hot

Introduction to Apache Camel
Introduction to Apache CamelIntroduction to Apache Camel
Introduction to Apache Camel
Claus Ibsen
 
Quarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java frameworkQuarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java framework
SVDevOps
 
Mutiny + quarkus
Mutiny + quarkusMutiny + quarkus
Mutiny + quarkus
Edgar Domingues
 
Empowering Your Java Applications with Quarkus. A New Era of Fast, Efficient,...
Empowering Your Java Applications with Quarkus. A New Era of Fast, Efficient,...Empowering Your Java Applications with Quarkus. A New Era of Fast, Efficient,...
Empowering Your Java Applications with Quarkus. A New Era of Fast, Efficient,...
Ivelin Yanev
 
Rabbit MQ introduction
Rabbit MQ introductionRabbit MQ introduction
Rabbit MQ introduction
Shirish Bari
 
[Webinar]: Working with Reactive Spring
[Webinar]: Working with Reactive Spring[Webinar]: Working with Reactive Spring
[Webinar]: Working with Reactive Spring
Knoldus Inc.
 
JMS Providers Overview
JMS Providers OverviewJMS Providers Overview
JMS Providers Overview
Vadym Lotar
 
Apache Kafka Introduction
Apache Kafka IntroductionApache Kafka Introduction
Apache Kafka Introduction
Amita Mirajkar
 
Rabbitmq basics
Rabbitmq basicsRabbitmq basics
Rabbitmq basics
Abdriy Mosin
 
Introduction to Apache ActiveMQ Artemis
Introduction to Apache ActiveMQ ArtemisIntroduction to Apache ActiveMQ Artemis
Introduction to Apache ActiveMQ Artemis
Yoshimasa Tanabe
 
Akka Actor presentation
Akka Actor presentationAkka Actor presentation
Akka Actor presentation
Gene Chang
 
Reactive programming intro
Reactive programming introReactive programming intro
Reactive programming intro
Ahmed Ehab AbdulAziz
 
Microservices in Practice
Microservices in PracticeMicroservices in Practice
Microservices in Practice
Kasun Indrasiri
 
Rabbitmq an amqp message broker
Rabbitmq an amqp message brokerRabbitmq an amqp message broker
Rabbitmq an amqp message broker
ANASYS
 
Spring Webflux
Spring WebfluxSpring Webflux
Spring Webflux
Carlos E. Salazar
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
tyrantbrian
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
The Software House
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
All Things Open
 
IBM MQ and Kafka, what is the difference?
IBM MQ and Kafka, what is the difference?IBM MQ and Kafka, what is the difference?
IBM MQ and Kafka, what is the difference?
David Ware
 
Apache Camel Introduction
Apache Camel IntroductionApache Camel Introduction
Apache Camel Introduction
Claus Ibsen
 

What's hot (20)

Introduction to Apache Camel
Introduction to Apache CamelIntroduction to Apache Camel
Introduction to Apache Camel
 
Quarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java frameworkQuarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java framework
 
Mutiny + quarkus
Mutiny + quarkusMutiny + quarkus
Mutiny + quarkus
 
Empowering Your Java Applications with Quarkus. A New Era of Fast, Efficient,...
Empowering Your Java Applications with Quarkus. A New Era of Fast, Efficient,...Empowering Your Java Applications with Quarkus. A New Era of Fast, Efficient,...
Empowering Your Java Applications with Quarkus. A New Era of Fast, Efficient,...
 
Rabbit MQ introduction
Rabbit MQ introductionRabbit MQ introduction
Rabbit MQ introduction
 
[Webinar]: Working with Reactive Spring
[Webinar]: Working with Reactive Spring[Webinar]: Working with Reactive Spring
[Webinar]: Working with Reactive Spring
 
JMS Providers Overview
JMS Providers OverviewJMS Providers Overview
JMS Providers Overview
 
Apache Kafka Introduction
Apache Kafka IntroductionApache Kafka Introduction
Apache Kafka Introduction
 
Rabbitmq basics
Rabbitmq basicsRabbitmq basics
Rabbitmq basics
 
Introduction to Apache ActiveMQ Artemis
Introduction to Apache ActiveMQ ArtemisIntroduction to Apache ActiveMQ Artemis
Introduction to Apache ActiveMQ Artemis
 
Akka Actor presentation
Akka Actor presentationAkka Actor presentation
Akka Actor presentation
 
Reactive programming intro
Reactive programming introReactive programming intro
Reactive programming intro
 
Microservices in Practice
Microservices in PracticeMicroservices in Practice
Microservices in Practice
 
Rabbitmq an amqp message broker
Rabbitmq an amqp message brokerRabbitmq an amqp message broker
Rabbitmq an amqp message broker
 
Spring Webflux
Spring WebfluxSpring Webflux
Spring Webflux
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
 
IBM MQ and Kafka, what is the difference?
IBM MQ and Kafka, what is the difference?IBM MQ and Kafka, what is the difference?
IBM MQ and Kafka, what is the difference?
 
Apache Camel Introduction
Apache Camel IntroductionApache Camel Introduction
Apache Camel Introduction
 

Similar to 19 08-22 introduction to activeMQ

ActiveMQ interview Questions and Answers
ActiveMQ interview Questions and AnswersActiveMQ interview Questions and Answers
ActiveMQ interview Questions and Answers
jeetendra mandal
 
Messaging in Java
Messaging in JavaMessaging in Java
Messaging in Java
Dmitry Buzdin
 
Jms queues
Jms queuesJms queues
Jms queues
Karnam Karthik
 
Apache ActiveMQ
Apache ActiveMQ Apache ActiveMQ
Apache ActiveMQ
Srushti Patel
 
IBM MQ Series For ZOS
IBM MQ Series For ZOSIBM MQ Series For ZOS
IBM MQ Series For ZOS
Srinimf-Slides
 
Websphere MQ admin guide
Websphere MQ admin guideWebsphere MQ admin guide
Websphere MQ admin guide
Ram Babu
 
M messaging 2
M messaging 2M messaging 2
M messaging 2
Vasanthii Chowdary
 
Mule esb
Mule esbMule esb
Mule esb
himajareddys
 
Mule esb
Mule esbMule esb
Mule esb
himajareddys
 
IBM MQ V8 annd JMS 2.0
IBM MQ V8 annd JMS 2.0IBM MQ V8 annd JMS 2.0
IBM MQ V8 annd JMS 2.0
IBM Systems UKI
 
Jms
JmsJms
Jms queue
Jms queueJms queue
Jms queue
Son Nguyen
 
MOM - Message Oriented Middleware
MOM - Message Oriented MiddlewareMOM - Message Oriented Middleware
MOM - Message Oriented Middleware
Peter R. Egli
 
JMS
JMSJMS
Mule
MuleMule
Mule jms queues
Mule jms queuesMule jms queues
Mule jms queues
Gandham38
 
Cloud 2010
Cloud 2010Cloud 2010
Cloud 2010
steccami
 
WSO2 Product Release Webinar Introducing the WSO2 Message Broker
WSO2 Product Release Webinar   Introducing the WSO2 Message BrokerWSO2 Product Release Webinar   Introducing the WSO2 Message Broker
WSO2 Product Release Webinar Introducing the WSO2 Message Broker
WSO2
 
Java Messaging Services
Java Messaging ServicesJava Messaging Services
Java Messaging Services
kumar gaurav
 
Red book mq
Red book mqRed book mq
Red book mq
murali8620000
 

Similar to 19 08-22 introduction to activeMQ (20)

ActiveMQ interview Questions and Answers
ActiveMQ interview Questions and AnswersActiveMQ interview Questions and Answers
ActiveMQ interview Questions and Answers
 
Messaging in Java
Messaging in JavaMessaging in Java
Messaging in Java
 
Jms queues
Jms queuesJms queues
Jms queues
 
Apache ActiveMQ
Apache ActiveMQ Apache ActiveMQ
Apache ActiveMQ
 
IBM MQ Series For ZOS
IBM MQ Series For ZOSIBM MQ Series For ZOS
IBM MQ Series For ZOS
 
Websphere MQ admin guide
Websphere MQ admin guideWebsphere MQ admin guide
Websphere MQ admin guide
 
M messaging 2
M messaging 2M messaging 2
M messaging 2
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule esb
Mule esbMule esb
Mule esb
 
IBM MQ V8 annd JMS 2.0
IBM MQ V8 annd JMS 2.0IBM MQ V8 annd JMS 2.0
IBM MQ V8 annd JMS 2.0
 
Jms
JmsJms
Jms
 
Jms queue
Jms queueJms queue
Jms queue
 
MOM - Message Oriented Middleware
MOM - Message Oriented MiddlewareMOM - Message Oriented Middleware
MOM - Message Oriented Middleware
 
JMS
JMSJMS
JMS
 
Mule
MuleMule
Mule
 
Mule jms queues
Mule jms queuesMule jms queues
Mule jms queues
 
Cloud 2010
Cloud 2010Cloud 2010
Cloud 2010
 
WSO2 Product Release Webinar Introducing the WSO2 Message Broker
WSO2 Product Release Webinar   Introducing the WSO2 Message BrokerWSO2 Product Release Webinar   Introducing the WSO2 Message Broker
WSO2 Product Release Webinar Introducing the WSO2 Message Broker
 
Java Messaging Services
Java Messaging ServicesJava Messaging Services
Java Messaging Services
 
Red book mq
Red book mqRed book mq
Red book mq
 

Recently uploaded

Your LinkedIn Success Starts Here.......
Your LinkedIn Success Starts Here.......Your LinkedIn Success Starts Here.......
Your LinkedIn Success Starts Here.......
SocioCosmos
 
原版制作(Hull毕业证书)赫尔大学毕业证Offer一模一样
原版制作(Hull毕业证书)赫尔大学毕业证Offer一模一样原版制作(Hull毕业证书)赫尔大学毕业证Offer一模一样
原版制作(Hull毕业证书)赫尔大学毕业证Offer一模一样
7lkkjxt
 
HOW TO USE FACEBOOK _ by Clarissa Credito
HOW TO USE FACEBOOK _ by Clarissa CreditoHOW TO USE FACEBOOK _ by Clarissa Credito
HOW TO USE FACEBOOK _ by Clarissa Credito
ClarissaAlanoCredito
 
EASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANEEASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANE
Febless Hernane
 
快速办理(worcester毕业证书)伍斯特大学毕业证PDF成绩单一模一样
快速办理(worcester毕业证书)伍斯特大学毕业证PDF成绩单一模一样快速办理(worcester毕业证书)伍斯特大学毕业证PDF成绩单一模一样
快速办理(worcester毕业证书)伍斯特大学毕业证PDF成绩单一模一样
9u4xjk4w
 
STUDY ON THE DEVELOPMENT STRATEGY OF HUZHOU TOURISM
STUDY ON THE DEVELOPMENT STRATEGY OF HUZHOU TOURISMSTUDY ON THE DEVELOPMENT STRATEGY OF HUZHOU TOURISM
STUDY ON THE DEVELOPMENT STRATEGY OF HUZHOU TOURISM
AJHSSR Journal
 
Transportation_Channel_Investor_Presentation_April_2024_ Final .pdf
Transportation_Channel_Investor_Presentation_April_2024_ Final .pdfTransportation_Channel_Investor_Presentation_April_2024_ Final .pdf
Transportation_Channel_Investor_Presentation_April_2024_ Final .pdf
Matthewperry105
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAMLORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAM
lorraineandreiamcidl
 
Maximize Your Twitch Potential!..........
Maximize Your Twitch Potential!..........Maximize Your Twitch Potential!..........
Maximize Your Twitch Potential!..........
SocioCosmos
 
UR BHATTI ACADEMY AND ONLINE COURSES.pdf
UR BHATTI ACADEMY AND ONLINE COURSES.pdfUR BHATTI ACADEMY AND ONLINE COURSES.pdf
UR BHATTI ACADEMY AND ONLINE COURSES.pdf
urbhattiacademy
 
快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样
快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样
快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样
ryxqoswi
 
Dominate Reddit Discussions.............
Dominate Reddit Discussions.............Dominate Reddit Discussions.............
Dominate Reddit Discussions.............
SocioCosmos
 
HMS Facebook Stories All V1 06092024.docx
HMS Facebook Stories All V1 06092024.docxHMS Facebook Stories All V1 06092024.docx
HMS Facebook Stories All V1 06092024.docx
Charles Bayless
 

Recently uploaded (13)

Your LinkedIn Success Starts Here.......
Your LinkedIn Success Starts Here.......Your LinkedIn Success Starts Here.......
Your LinkedIn Success Starts Here.......
 
原版制作(Hull毕业证书)赫尔大学毕业证Offer一模一样
原版制作(Hull毕业证书)赫尔大学毕业证Offer一模一样原版制作(Hull毕业证书)赫尔大学毕业证Offer一模一样
原版制作(Hull毕业证书)赫尔大学毕业证Offer一模一样
 
HOW TO USE FACEBOOK _ by Clarissa Credito
HOW TO USE FACEBOOK _ by Clarissa CreditoHOW TO USE FACEBOOK _ by Clarissa Credito
HOW TO USE FACEBOOK _ by Clarissa Credito
 
EASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANEEASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANE
 
快速办理(worcester毕业证书)伍斯特大学毕业证PDF成绩单一模一样
快速办理(worcester毕业证书)伍斯特大学毕业证PDF成绩单一模一样快速办理(worcester毕业证书)伍斯特大学毕业证PDF成绩单一模一样
快速办理(worcester毕业证书)伍斯特大学毕业证PDF成绩单一模一样
 
STUDY ON THE DEVELOPMENT STRATEGY OF HUZHOU TOURISM
STUDY ON THE DEVELOPMENT STRATEGY OF HUZHOU TOURISMSTUDY ON THE DEVELOPMENT STRATEGY OF HUZHOU TOURISM
STUDY ON THE DEVELOPMENT STRATEGY OF HUZHOU TOURISM
 
Transportation_Channel_Investor_Presentation_April_2024_ Final .pdf
Transportation_Channel_Investor_Presentation_April_2024_ Final .pdfTransportation_Channel_Investor_Presentation_April_2024_ Final .pdf
Transportation_Channel_Investor_Presentation_April_2024_ Final .pdf
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAMLORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAM
 
Maximize Your Twitch Potential!..........
Maximize Your Twitch Potential!..........Maximize Your Twitch Potential!..........
Maximize Your Twitch Potential!..........
 
UR BHATTI ACADEMY AND ONLINE COURSES.pdf
UR BHATTI ACADEMY AND ONLINE COURSES.pdfUR BHATTI ACADEMY AND ONLINE COURSES.pdf
UR BHATTI ACADEMY AND ONLINE COURSES.pdf
 
快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样
快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样
快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样
 
Dominate Reddit Discussions.............
Dominate Reddit Discussions.............Dominate Reddit Discussions.............
Dominate Reddit Discussions.............
 
HMS Facebook Stories All V1 06092024.docx
HMS Facebook Stories All V1 06092024.docxHMS Facebook Stories All V1 06092024.docx
HMS Facebook Stories All V1 06092024.docx
 

19 08-22 introduction to activeMQ

  • 1. Introduction to Apache ActiveMQ 08. 22. 2019 Wooyoung Choi wychoi@redwood.snu.ac.kr Real-Time Operating Systems Laboratory, Seoul National University
  • 2. 2 Contents I. Introduction II. Java Message Service (JMS) III. Message Oriented Middleware (MOM) IV. ActiveMQ V. Conclusion Introduction to Apache ActiveMQ
  • 3. 3 The Goal of the Presentation  To get a clear understanding of Apache ActiveMQ.  ActiveMQ is ① Java Message Service (JMS) 1.1 compliant. • ActiveMQ is implemented with JMS. ② Message Oriented Middleware (MOM) product that provides asynchronous messaging. I. Introduction
  • 4. 4 Motivation  As a replacement for Remote Procedure Call (RPC). RPC-synchronous calls have a limited scalability. Backed up requests slow down the whole system. Solution : Use asynchronous call to increase scalability.  To achieve high availability and scalability. The ability to continue functioning after failure of one or more servers. Solution : Migrate from one server to another using brokers in event of server failure. I. Introduction Client server RPC
  • 5. 5 Contents I. Introduction II. Java Message Service (JMS) III. Message Oriented Middleware (MOM) IV. ActiveMQ V. Conclusion Introduction to Apache ActiveMQ
  • 6. 6 Overview  What is Java Message Service (JMS)? JMS is a Message Oriented Middleware (MOM). Loosely coupled communication. Asynchronous messaging. Reliable delivery which means high availability. II. Java Message Service (JMS) JMS Interface
  • 7. 7 Goals of JMS  When to use JMS? When the provider do not want the components to depend on other components’ interfaces. When the provider wants the application to run whether all components are running or not. When the provider wants a component to operate without receiving an immediate response. II. Java Message Service (JMS)
  • 8. 8 JMS Messaging Models (1)  Point to Point Each message has only one receiver. Message is sent to a queue. There is no dependency between producer and receiver. • Producer and receiver are independent to each other.  Publish-Subscribe II. Java Message Service (JMS)
  • 9. 9 JMS Messaging Models (2)  Point to Point  Publish-Subscribe Each message can have multiple receivers. Messages are sent to Topic. It is used when multiple receivers need to receive the same messages. II. Java Message Service (JMS)
  • 10. 10 JMS Provider: ActiveMQ II. Java Message Service (JMS)  Java Message Service (JMS) lets user to send messages from one program to another.  However, it doesn’t use direct connection. Instead the message is sent to a JMS provider, such as ActiveMQ, and put there in a queue.  Summary: ActiveMQ is a JMS provider and it is implemented with JMS.
  • 11. 11 Contents I. Introduction II. Java Message Service (JMS) III. Message Oriented Middleware (MOM) IV. ActiveMQ V. Conclusion Introduction to Apache ActiveMQ
  • 12. 12 Overview  Definition The layer, which allows programs to communicate by sending and receiving messages.  Objective Message Oriented Middleware allows programmers to integrate many heterogeneous components for software systems. III. Message Oriented Middleware (MOM)
  • 13. 13 Features of MOM: Message Queue  MOM is implemented as a form of Message Queue.  Message Queue’s features are Scalability ① Broker clusters ② Multiple destinations for a publishers or subscribers. Availability ① Broker clusters ② Master/Slave Performance ① Memory resource management III. Message Oriented Middleware (MOM)
  • 14. 14 Contents I. Introduction II. Java Message Service (JMS) III. Message Oriented Middleware (MOM) IV. ActiveMQ V. Conclusion Introduction to Apache ActiveMQ
  • 15. 15 Overview  What is ActiveMQ? Message Oriented Middleware (MOM) • The layer that allows software components to interact with one other. ActiveMQ is the most popular open source messaging and JMS provider developed by Apache. IV. ActiveMQ JMS Compliant
  • 16. 16 Features  Supports a variety of Cross Language Clients from Java, C, C++, C#, Python, PHP.  Designed for high performance clustering. Network of brokers  Supports very fast and stable persistence Master/Slave IV. ActiveMQ
  • 17. 17 Clustered Brokers improve scalability  Networks of Brokers It creates a cluster composed of multiple ActiveMQ instances. It allows brokers to communicate each other. Consequence : It improves scalability. IV. ActiveMQ
  • 18. 18 Master/Slave improves persistence (1)  Shared-Nothing Master/Slave structure Master and Slave have their own message storage. Slave is connected to the master broker. All message commands are replicated from the master. Slave broker takes over Master broker’s task when Master broker falls down. IV. ActiveMQ
  • 19. 19 Master/Slave improves persistence (2)  Shared-Storage Master/Slave structure Allows many brokers to share the storage mechanism. Only one broker can be live at any given time. Master has a file lock and another slave takes over the lock when the master falls down. IV. ActiveMQ
  • 20. 20 Hello World Example using ActiveMQ (1) 1. Connect Producer to broker URL (tcp://localhost:61616). 2. Send a small text message saying “Hello World”. 3. The text message is enqueued in broker URL. 4. Connect Receiver to broker URL (tcp://localhost:61616). 5. Receiver receives the text message from the queue at broker URL. 6. The message is dequeued. IV. ActiveMQ
  • 21. 21 Hello World Example using ActiveMQ (2) 1. Connect Producer to broker URL (tcp://localhost:61616). 2. Send a small text message saying “Hello World”. IV. ActiveMQ ① ②
  • 22. 22 Hello World Example using ActiveMQ (3) 3. The text message is enqueued in broker URL. IV. ActiveMQ ③
  • 23. 23 Hello World Example using ActiveMQ (4) 4. Connect Receiver to broker URL (tcp://localhost:61616). 5. Receiver receives the text message from the queue at broker URL. IV. ActiveMQ ④ ⑤
  • 24. 24 Hello World Example using ActiveMQ (5) 6. The message is dequeued. IV. ActiveMQ ⑥
  • 25. 25 Contents I. Introduction II. Java Message Service (JMS) III. Message Oriented Middleware (MOM) IV. ActiveMQ V. Conclusion Introduction to Apache ActiveMQ
  • 26. 26 Summary  Apache ActiveMQ is Java Message Service provider Message Oriented Middleware with high scalability and reliability  Clustered Brokers Improve scalability. Guarantee availability.  Master/Slave Brokers Guarantee fast and stable persistence when one falls down. V. Conclusion