JMS Interview Questions | Javamazon

JMS Interview Questions | Javamazon:

What is JMS ?
The Java Message Service (JMS), which is designed by Sun Microsystems and several other companies
under the Java Community Process as JSR 914, is the first enterprise messaging API that has 
received wide industry support. The Java Message Service (JMS) was designed to make it easy to 
develop business applications that asynchronously send and receive business data and events. It 
defines a common enterprise messaging API that is designed to be easily and efficiently 
supportedby a wide range of enterprise messaging products. JMS supports both messaging models: 
point-to-point (queuing) and publish-subscribe.
What is the basic difference between Publish Subscribe model and P2P model?
Publish Subscribe(Topic) model is typically used in one-to-many situation. It is unreliable but 
very fast. P2P model(Queue) is used in one-to-one situation. It is highly reliable.
What are the advantages of JMS?
One of the principal advantages of JMS messaging is that it's asynchronous.
What is the difference between queue and topic ?
A point-to-point (PTP) product or application is built around the concept of message queues, 
senders, and receivers. Each message is addressed to a specific queue, and receiving clients 
extract messages from the queue(s) established to hold their messages. Queues retain all 
messages sent to them until the messages are consumed or until the messages expire.

In a publish/subscribe (pub/sub) product or application, clients address messages to a topic. 
Publishers and subscribers are generally anonymous and may dynamically publish or subscribe to the 
content hierarchy. The system takes care of distributing the messages arriving from a topic's 
multiple publishers to its multiple subscribers. Topics retain messages only as long as it takes 
to distribute them to current subscribers.
What is the difference between BytesMessage and StreamMessage?
BytesMessage stores the primitive data types by converting them to their byte representation.
StreamMessage maintains a boundary between the different data types stored because it also store 
the type information along with the value of the primitive being stored.
What is JMS API ?
The Java Message Service is a Java API that allows applications to create, send, receive, and read 
messages, loosely coupled, Asynchronous,Reliable
Whats is SonicMQ role in encryption ?
SonicMQ is a leading JMS provider and they have a robust encryption mechanism called Quality of 
Protection. They also provide an SSL-related feature, which also has build in encryption.
What is synchronous messaging?
Synchronous messaging involves a client that waits for the server to respond to a message. So if 
one end is down the entire communication will fail.
Main parts of JMS applications
The main parts of JMS applications are:
JMS Application Model
How does JMS API messaging provides guaranteed delivery of Messages ?
JMS API messaging provides guaranteed delivery via the once-and-only-once delivery semantics of 
PERSISTENT messages. In addition, message consumers can insure reliable processing of messages 
by using either CLIENT_ACKNOWLEDGE mode or transacted sessions. This achieves reliable delivery 
with minimum synchronization.


Post a Comment