jdk11.0.12,jms.jar 2.0_JMS API概述:JMS 1.x和JMS 2.x

 2023-11-19 阅读 20 评论 0

摘要:jms.jar 2.0Before 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.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的詳細信息。

JMS API 1.0概述 (JMS API 1.0 Overview)

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消息傳遞模型:

  • P2P Messaging Model API

    P2P消息傳遞模型API
  • Pub/Sub Messaging Model API

    發布/訂閱消息傳遞模型API

P2P消息傳遞模型API: (P2P Messaging Model API:)

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作為其目的地。

  • QueueConnectionFactory

    QueueConnectionFactory
  • QueueConnection

    隊列連接
  • QueueSession

    隊列會話
  • Queue

    隊列
  • Message

    信息
  • QueueReceiver

    隊列接收器
  • QueueSender

    隊列發送者
  • JMSException

    JMSException

發布/訂閱消息傳遞模型API: (Pub/Sub Messaging Model API:)

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,以支持發布/訂閱消息模型,因為發布/訂閱使用主題作為其目的地。

  • TopicConnectionFactory

    TopicConnectionFactory
  • TopicConnection

    TopicConnection
  • TopicSession

    TopicSession
  • Topic

    話題
  • Message

    信息
  • TopicSubscriber

    主題訂閱者
  • TopicPublisher

    主題發布者
  • JMSException

    JMSException

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 API 1.1概述 (JMS API 1.1 Overview)

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來非常輕松地開發這兩種消息傳遞模型。

  • ConnectionFactory

    連接工廠
  • Connection

    連接
  • Destination

    目的地
  • Message

    信息
  • MessageConsumer

    MessageConsumer
  • MessageProducer

    消息制作人
  • JMSException

    JMSException

JMS API 2.0概述 (JMS API 2.0 Overview)

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的新功能,例如注釋和泛型。 它還重命名了一些接口名稱,以提高可讀性并避免混淆。

  • ConnectionFactory

    連接工廠
  • JMSContext

    JMSContext
  • Destination

    目的地
  • Message

    信息
  • JMSConsumer

    JMS消費者
  • JMSProducer

    JMS生產者
  • JMSRuntimeException

    JMSRuntimeException

JMS API摘要: (JMS API Summary:)

Legacy P2P APILegacy Pub-Sub APIClassic APISimplified API
QueueConnectionFactoryTopicConnectionFactoryConnectionFactoryConnectionFactory
QueueConnectionTopicConnectionConnectionJMSContext
QueueSessionTopicSessionSessionJMSContext
QueueTopicDestinationDestination
MessageMessageMessageMessage
QueueSenderTopicPublisherMessageProducerJMSProducer
QueueReceiverTopicSubscriberMessageConsumerJMSConsumer
JMSExceptionJMSExceptionJMSExceptionJMSRuntimeException
舊版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

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/1/183233.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息