• 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

RPC

How JMS is different from RPC?

April 26, 2017 By j2eereference Leave a Comment

This article is intended to explain how JMS is different from RPC. JMS is the acronym of Java Message Service and RPC is the acronym of Remote Procedure Call. Both JMS and RPC are involved in message transmission. However, JMS is different from RPC in the way the messaging is done. The difference between JMS and RPC is explained in the tabular column below:

Java Messaging Service (JMS) Remote Procedure Call (RPC)

JMS is asynchronous in nature. When a message has to be transmitted, Sender will send the message to the receiver. With this, Sender’s job is done and it will continue with its further processing. Receiver will receive the message and continue with its own processing. No acknowledgement is sent from the receiver to sender after receiving the message. This is because, JMS is asynchronous.

RPC is synchronous in nature. Unlike JMS, the invoker of the remote procedure call will invoke the method and continue to wait until the invoked method completes its execution. Once when the invoked method execution is complete, then the control returns back to the invoker. This is because, RPC is synchronous in behaviour.

There is no coupling between the sender and receiver of the message in JMS. Thus, JMS allows new senders and receivers to be added dynamically thereby managing variations in complexity over a period of time.  Hence, JMS is loosely coupled.

RPC establishes tight coupling between the systems that interact with one another. When the invoker invokes a remote method, the invoker will get blocked until the response comes back to the invoker.

When there is an unexpected failure, JMS will store the messages that are pending to be delivered. When the system is up, the stored messages will be transmitted to the corresponding receivers.

When there is an unexpected failure, the failure will impact the entire system. Thereby, the entire system will go down.

 

Related Posts

  • Differences between Point to Point Messaging Model and Publish Subscribe Messaging Model
  • Point to Point Messaging Model Architecture
  • Publish Subscribe Messaging Model Architecture
  • 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: difference, Java Message Service, JMS, Remote Procedure Call, RPC

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.