JMS 面试题与答案
问题 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.
问题 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.
问题 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.
问题 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.
问题 20. What is JMS application?
One or more JMS clients that exchange messages.
用户评价最有帮助的内容:
- How many messaging models do JMS provide for and what are they?
- What is JMS (Java Messaging Service)?
- What are the different types of messages available in the JMS API?
- How the JMS is different from RPC?
- What are the basic advantages of JMS?