jms.jar 2.0
Before going to read this post, please read my previous posts about JMS basics. And also please go through my previous post about “JMS Architecture”.
在閱讀這篇文章之前,請閱讀我以前有關JMS基礎知識的文章。 另外,請閱讀我之前有關“ JMS體系結構”的文章 。
In this post, we are going to discuss about JMS 1.x and 2.x API details.
在本文中,我們將討論有關JMS 1.x和2.x API的詳細信息。
jdk11.0.12?JMS API V.1.0/1.0.1/1.02 is also known as Legacy API. It is not recommended to use this API to implement Messaging system.
JMS API V.1.0 / 1.0.1 / 1.02也稱為舊版API。 不建議使用此API來實現消息系統。
JMS API Version 1.0 is divided into the following two categories to deal with available two JMS Messaging Models:
JMS API版本1.0分為以下兩類,以處理可用的兩個JMS消息傳遞模型:
JMS API has provided a set of API with QueueXXX name to support P2P (Point-To-Point) Messaging model because P2P uses Queue as its destination.
JMS API提供了一組帶有QueueXXX名稱的API,以支持P2P(點對點)消息傳遞模型,因為P2P使用Queue作為其目的地。
jdk api 1.6.0中文版。JMS API has provided another set of API with TopicXXX name to support Pub/Sub Messaging model because pub/sub uses Topic as its destination.
JMS API提供了另一組具有TopicXXX名稱的API,以支持發布/訂閱消息模型,因為發布/訂閱使用主題作為其目的地。
As it is deprecated and also not recommended to use in our applications, I am not going to give any code examples for this API.
由于不建議使用它,也不建議在我們的應用程序中使用它,因此我將不提供此API的任何代碼示例。
JMS V.1.1 API is also known as Classic API.To avoid all these confusions – two different set of APIs, JMS V.1.1 API has introduced only one common API to develop both Messaging models very easily.
JMS V.1.1 API也被稱為經典API。為避免所有這些混淆-兩套不同的API,JMS V.1.1 API僅引入了一個通用API來非常輕松地開發這兩種消息傳遞模型。
jdk1.8.0_102是哪個版本。After a decade of JMS V.1.1 version release, JMS API had updated to V.2.0 as part of Java EE 7 release. This new JMS V.2.0 API is also known as Simplified API.
在JMS V.1.1版本發布了十年之后,作為Java EE 7版本的一部分,JMS API已更新到V.2.0。 這個新的JMS V.2.0 API也稱為簡化API。
JMS 2.0 has improved previous version to reduce the creation of more objects, to provided new set of methods to ease of development and also to support Java EE new features like Annotations and Generics. It also renamed some interface names for better readability and to avoid confusions.
JMS 2.0改進了以前的版本,以減少創建更多對象,提供了新的方法集來簡化開發,并支持Java EE的新功能,例如注釋和泛型。 它還重命名了一些接口名稱,以提高可讀性并避免混淆。
Legacy P2P API | Legacy Pub-Sub API | Classic API | Simplified API |
---|---|---|---|
QueueConnectionFactory | TopicConnectionFactory | ConnectionFactory | ConnectionFactory |
QueueConnection | TopicConnection | Connection | JMSContext |
QueueSession | TopicSession | Session | JMSContext |
Queue | Topic | Destination | Destination |
Message | Message | Message | Message |
QueueSender | TopicPublisher | MessageProducer | JMSProducer |
QueueReceiver | TopicSubscriber | MessageConsumer | JMSConsumer |
JMSException | JMSException | JMSException | JMSRuntimeException |
舊版P2P API | 舊版Pub-Sub API | 經典API | 簡化的API |
---|---|---|---|
QueueConnectionFactory | TopicConnectionFactory | 連接工廠 | 連接工廠 |
隊列連接 | TopicConnection | 連接 | JMSContext |
隊列會話 | TopicSession | 屆會 | JMSContext |
隊列 | 話題 | 目的地 | 目的地 |
信息 | 信息 | 信息 | 信息 |
隊列發送者 | 主題發布者 | 消息制作人 | JMS生產者 |
隊列接收器 | 主題訂閱者 | MessageConsumer | JMS消費者 |
JMSException | JMSException | JMSException | JMSRuntimeException |
That’s it all about JMS API Overview. We will discuss some more JMS Concepts in my coming posts.
這就是有關“ JMS API概述”的全部內容。 我們將在我的后續文章中討論更多的JMS概念。
JMS系統登錄。Please drop me a comment if you like my post or have any issues/suggestions.
如果您喜歡我的帖子或有任何問題/建議,請給我評論。
翻譯自: https://www.journaldev.com/9776/jms1-and-jms2-api-overview
jms.jar 2.0
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态