• Skip to primary navigation
  • Skip to main 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

Point to Point Messaging Model Vs Publish Subscribe Messaging Model

Differences between Point to Point Messaging Model and Publish Subscribe Messaging Model

May 2, 2017 By j2eereference Leave a Comment

Differences between Point to Point Messaging Model and Publish Subscribe Messaging Model is explained in this article. Point to Point Messaging Model and Publish Subscribe Messaging Model are the two different messaging paradigms supported by Java Message Service (JMS). These messaging paradigms are programming models that support asynchronous way of messaging between diverse systems.

Listed below are the differences between Point to Point Messaging Model and Publish Subscribe Messaging Model is explained in this article. Point to Point Messaging Model and Publish Subscribe Messaging Model:

Point to Point Messaging Model

Publish Subscribe Messaging Model

JMS Destination is Queue

JMS Destination is Topic

JMS Producer is called as Sender

JMS Producer is referred as Publisher

JMS Consumer is called as Receiver

JMS Consumer is referred as Subscriber

In Point to Point Messaging Model, message can be received by only one JMS Consumer

In Publish Subscribe Messaging Model, a message can  be received by several JMS Consumers

There is no time dependency laid for the receiver to receive the message. If in case the receiver is unavailable to receive the message at any point of time, then queue will store the message until receiver is ready to receive it

There is a time dependency that is laid between the Producer and Consumer in Publish Subscribe Messaging Model

When the Consumer receives the message, it will send an acknowledgement back to the Producer

No acknowledgement is sent by the Consumers when they receive the message

There is no further classification of Point to Point Messaging Model

Publish Subscribe Messaging Model is further classified into Persistent Messaging Model and Non-Persistent Messaging Model. In Persistent Messaging Model, messages are stored in the JMS Server until there are delivered to the Destination, but in Non-Persistent Messaging Model, there is no intermediate storage option

Point to Point Messaging Model contains four possible architectures namely:

  • One Producer connected with one Consumer
  • One Producer connected to several Consumers
  • Several Producers connected to one Consumer
  • Several Producers connected to several Consumers

In all these possible architectures, a Producer has a limitation to send a message to only one Consumer. This is because, Point to Point Messaging Model enforces one to one relationship between the Producer and Consumer

Publish Subscribe Messaging Model contains only three possible architectures namely:

  • One Producer connected to several Consumers
  • Several Producers connected to one Consumer
  • Several Producers connected to several Consumers

In all these possible architectures, Producer has the leverage to send a message to one or more (many) Consumers. This is because, Publish Subscribe Messaging Model enforces one to many relationship between the Producer and Consumer

 

 

 

Related Posts

  • Point to Point Messaging Model Architecture
  • Publish Subscribe 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: Differences between Point to Point Messaging Model and Publish Subscribe Messaging Model, Different messaging paradigms supported by Java Message Service, Java Message Service, JMS, Messaging Model, point to point messaging model, Point to Point Messaging Model Vs Publish Subscribe Messaging Model, Publish Subscribe Messaging Model

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

  • What is parallel Stream
  • reduce method of the Stream class
  • Difference between the findFirst() and findAny() method
  • intern() method of String class
  • SOLID – Five principles of object-oriented software design
  • Java Coding Best Practices
  • How to use lambda expression effectively
  • Enhanced pseudo-Random Number Generators in java17
  • How to use Foreign-Memory Access API
  • Pattern Matching for instanceof
  • Text Blocks – Feature added in Java17
  • Record – The new feature added in java 17
  • What is Sealed Class
  • Features added in Java 17
  • Java Buzzwords

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.