JMS (Java Message Service)
JMS (Java Message Service) is a Java API that allows you to create, send, receive, and read messages. It also mandates that messaging is asynchronous and has specific elements of reliability, like guaranteed and once-and-only-once delivery. JMS is the defacto messaging solution in the Java community.(JMS-java消息服务是java的API,它允许用户创建、发送、接收、读取信息。它规定了信息传送是异步的、有可靠而具体的实体,比如确定一次只完成一次交付,JMS是java体系中的消息传递解决方案)。
In JMS , message consumers and producers talk to one another through an intermediary—a JMS destination. As shown in figure 2.4, a destination can be either a queue or a topic. (在JMS中,消息的消费者和生产者通过JMS的中间件destination进行交互,destination分为queue 和 topic)
Queues are strictly point-to-point, where each message has only one consumer. (队列是严格的点对点,一条message只有一个消费者)
Topics operate on a publish/subscribe scheme; a single message may be delivered to many consumers if they have subscribed to the topic.(主题运行一种发布订阅的模式,如果消费者订阅了主题,单条消息将发给多个consumers )