Top JMS (Java Messaging Service) Interview Questions
In this post we will look at JMS Interview questions. Examples are provided with explanation.
Q: What is JMS(Java Messaging Service)?
A: Java Message Service (JMS) is an application program interface (API) from Sun Microsystems that supports the formal communication known as messaging between computers in a network. Sun's JMS provides a common interface to standard messaging protocols and also to special messaging services in support of Java programs. Sun advocates the use of the Java Message Service for anyone developing Java applications, which can be run from any major operating system platform.
Q: What are components of JMS?
A: The components of JMS are as follows-
- 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. - Administered objects
Preconfigured JMS objects created by an administrator for the use of clients.
Q: What type of Messaging is provided by JMS?
A: JMS provides both synchronous and asynchronous messaging
Q: Explain synchronous messaging in JMS?
A: Synchronous messaging describes communications that takes place between two applications or systems, where the system places a message in a message queue (also called an Event Queue in enterprise messaging systems) and then waits for a message response before it continues processing.