• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to footer
  • Core Java
  • Design Patterns
  • JSP
  • Servlets
  • Building Tools
  • jQuery
  • Spring
  • Hibernate
  • Mongo DB
  • More
    • HTML
    • SCJP
    • AJAX
    • UML
    • Struts
    • J2EE
    • Testing
    • Angular JS

J2EE Reference

  • Home
  • About Us
    • Java Learning Centers
  • Contact Us

JMS Server

Publish Subscribe Messaging Model Architecture

April 28, 2017 By j2eereference Leave a Comment

Publish Subscribe Messaging Model is a messaging paradigm supported by JMS (Java Message Service). It is intended to provide asynchronous message transmission between publisher and subscriber using topics. In this article, lets discuss about Publish Subscribe Messaging Model Architecture in detail.

In Publish Subscribe Messaging Model, the components are:

  • Destination: Topic
  • JMS Producer: Publisher
  • JMS Consumer: Subscriber(s)

Publish Subscribe Messaging Model Architecture

In Publish Subscribe Messaging Model, JMS Publisher and JMS Subscriber will be configured to a Topic. JMS Publisher will create messages and publish those messages in Topics. Different JMS Subscribers will subscribe to the Topics of their interest and consume all the messages that are published in those Topics. The Publish Subscribe Messaging Model architecture is diagrammatically represented below:

Publish Subscribe Messaging Model

Unlike Point to Point Messaging Model, the Publish Subscribe Model has a timeline dependency. The messages can be consumed by the Subscribers if the Subscriber is active at that time and only if the Subscriber is subscribed to that Topic in which the message is published.

Possible Ways to Implement Publish Subscribe Messaging Model 

Publish Subscribe Messaging Model Architecture can be implemented in the following ways:

  • Single publisher and several subscribers connected to a Topic
  • Several publishers and single subscriber connected to a Topic
  • Several publishers and several subscribers connected to a Topic

Any number of Publishers and Subscribers can be configured to a Topic as listed above, but the JMS Message published by one publisher will be consumed by all the subscribers who have subscribed to that Topic. This is because Publish Subscribe Messaging Model establishes a 1 to Many relationship between the Publisher and Subscriber.

Publish Subscribe Messaging Model Classification

Publish Subscribe Messaging Model can further be classified into two different models namely:

  • Persistent Messaging Model – It is also called as Durable Messaging Model. This model has the capability to store messages in the JMS Server until it is delivered to the destination.

  • Non-Persistent Messaging Model – It is also called as Non-Durable Messaging Model. This model does not store messages in the JMS Server.

Related Posts

  • Differences between Point to Point Messaging Model and Publish Subscribe Messaging Model
  • Point to Point Messaging Model Architecture
  • How JMS is different from RPC?
  • Different types of messages available in JMS API
  • Advantages of Java Message Service (JMS)
  • Java Message Service and JMS Programming Model
  • What is JavaServer Pages (JSP)?
  • Java EE or J2EE Architecture

Filed Under: J2EE Tagged With: Durable Messaging Model, JMS, JMS Server, Non-Durable Messaging Model, Non-Persistent Messaging Model, Persistent Messaging Model, Publish Subscribe Messaging Model, Publish Subscribe Messaging Model Architecture, Publisher, Subscriber

Primary Sidebar

FOLLOW US ONLINE

  • View J2eereference-166104970118637’s profile on Facebook
  • View j2eereference’s profile on Twitter
  • View j2eereference’s profile on LinkedIn

Subscribe by email

Recent posts

  • Java Buzzwords
  • Anonymous Inner Class in Java
  • Network Programming – java.net Package
  • Java Regular Expressions
  • Method Local Inner Class in Java
  • URL Processing in Java
  • Iterator Design Pattern Implementation using Java
  • Strategy Design Pattern Implementation using Java
  • Decorator Design Pattern
  • Adapter Design Pattern Implementation using Java
  • JSF Composite Components
  • JSF UI Components
  • What is JavaServer Faces (JSF)?
  • GOF Design Patterns
  • History and Need for Design Patterns

Footer

Core Java
Design Patterns
JSP
Servlets
HTML
Building Tools
AJAX
SCJP
jQuery
Testing
Spring
UML
Struts
Java Centers
Java Training
Home
About Us
Contact Us
Copyright © j2eereference.com. All right reserved.