activemq in action(2)
2013-06-09 19:06 很大很老实 阅读(203) 评论(0) 编辑 收藏 举报针对message,JMS定义了很多不同的概念:
JMS Client - An application written using 100% pure Java to send and receive messages.
100%用java写的程序,用来发送和接受message;
• Non-JMS Client - An application is written using the JMS provider's native client API to send and receive messages instead of JMS.
调用JMS provider的原生客户段api,用来发送和接受消息,而不是通过JMS。
• JMS Producer - A client application that creates and sends JMS messages.
用来创建和发送JMS 消息的客户端程序
• JMS Consumer - A client application that receives and processes JMS messages.
用来接受和处理JMS消息的客户端程序。
• JMS Provider - The implementation of the JMS interfaces which is ideally written in 100% pure Java.
• JMS Message - The most fundamental concept of JMS; sent and received by JMS clients.
• JMS Domains - The two styles of messaging that include point-to-point and publish/subscribe.
• Administered Objects - Preconfigured JMS objects that contain provider-specific configuration data for use by clients. These objects are typically accessible by clients via JNDI.
• Connection Factory - Clients use a connection factory to create connections to the JMS provider.
• Destination - An object to which messages are addressed and sent and from which messages are received.
JMS定义了两种客户端:JMS客户端和非JMS客户端。
JMS客户端利用JMS API和JMS PROVIDER(比如activemq)进行交互,就想使用JDBC API访问数据库一样。
JMS客户端使用JMS API使对message服务的访问更加的标准化。
JMS producer:
JMS客户端使用JMS的MessageProducer类来传送信息到目的地,一般来说,当使用Session.createProducer()来创建producer时,缺省设定目的地。
MessageProducer这个接口定义的东西特别多:
JMS Consumer:
JMS客户端使用MessageConsumer来处理来自目的端的消息。