InJMS(Java Message Service)Topic implementationPublish and subscribeSemantics. When a message is publish, it will be sent to all interested subscribers, so there are no more than oneSubscriber(The computer vocabulary is interpreted as"User")A copy of the received message. However, when the message proxy receives a message, only the subscribed subscriber can get a copy of the message.
JMS queueRunLoad balancerSemantics. A message can only beConsumerYes. If no consumer is available when the message is sent, it will be saved until the consumer that can process the message is available. If a consumer receives a message but does not respond to it, the message is forwarded to another consumer. A single queue can have many consumers and load balancing among multiple available consumers
Two message transmission methods in the JMS SpecificationTopic and queue, The comparison between the two is as follows ():
Message confirmation methods:Three types:
Auto_acknowledge(Automatic notification)
Client_acknowledge(The client determines the notification time.)
Dups_ OK _acknowledge(Latency // batch notification)
If you are usingThe client determines the notification time.InMessagelistenerLiExplicit callMessage. Acknowledge ()To notify the server. The server takes corresponding actions after receiving the notification.