JMS Interview Questions and Answers
Ques 16. What is JMS session?
A single-threaded context for sending and receiving JMS messages. A JMS session can be nontransacted, locally transacted, or participating in a distributed transaction.
Ques 17. What is the use of JMS? In which situations we are using JMS? Can we send message from one server to another server using JMS?
JMS is the ideal high-performance messaging platform for intrabusiness messaging, with full programmatic control over quality of service and delivery options.
Ques 18. What is the difference between durable and non-durable subscriptions?
Point-To-Point (PTP). This model allows exchanging messages via queues created for some purposes. A client can send and receive messages from one or several queues. PTP model is easier than pub/sub model.
A durable subscription gives a subscriber the freedom of receiving all messages from a topic, whereas a non-durable subscription doesn't make any guarantees about messages sent by others when a client was disconnected from a topic.
Ques 19. What is the difference between Message producer and Message consumer?
In Publish/Subscribe model:
A publish/subscribe (pub/sub) messaging system supports an event driven model where information consumers and producers participate in the transmission of messages. Producers "publish" events, while consumers "subscribe" to events of interest, and consume the events. Producers associate messages with a specific topic, and the messaging system routes messages to consumers based on the topics the consumers register interest in.
In Point-To-Point model:
In point to point messaging systems, messages are routed to an individual consumer which maintains a queue of "incoming" messages. Messaging applications send messages to a specified queue, and clients retrieve messages from a queue.
Ques 20. What is JMS application?
One or more JMS clients that exchange messages.
Most helpful rated by users:
- How many messaging models do JMS provide for and what are they?
- What is JMS (Java Messaging Service)?
- How the JMS is different from RPC?
- What are the different types of messages available in the JMS API?
- What are the basic advantages of JMS?