jms架构_JMS架构和JMS API架构

jms架构

Before reading this post, please go through my previous at “JMS Administered Objects and JMS Message” to understand some JMS Basic concepts.

在阅读本文之前,请仔细阅读我以前的“ JMS管理对象和JMS消息”以了解一些JMS基本概念。

In this post we are going to discuss about JMS Architecture that is how JMS Systems interact each other Asynchronously.

在本文中,我们将讨论JMS体系结构,即JMS系统如何彼此异步交互。

发表简短的目录: (Post Brief TOC:)

  • JMS API Architecture

    JMS API架构
  • Common Steps in a Messaging System

    邮件系统中的常见步骤
  • High-Level JMS Architecture

    高级JMS架构
  • Low-Level JMS Architecture

    低级JMS架构
  • JMS API Architecture

    JMS API架构

JMS体系结构 (JMS Architecture)

The following diagram shows a Typical Messaging System/JMS System Architecture in detail:

下图详细显示了典型的消息系统/ JMS系统体系结构:

NOTE:-
Both JMS Messaging models( P2P Model and Pub/Sub model) follow the same Architecture. They only differ in Destination types, which are used to exchange messages.

注意:-
两种JMS消息传递模型(P2P模型和Pub / Sub模型)都遵循相同的体系结构。 它们仅在用于交换消息的目标类型上有所不同。

邮件系统中的常见步骤: (Common Steps in a Messaging System:)

  • System Administrator uses JMS Provider provided Admin Console and configures all required administered objects like ConnectionFactory and Destinations in JNDI Repository of JMS Provider.

    系统管理员使用JMS Provider提供的管理控制台,并在JMS Provider的JNDI存储库中配置所有必需的管理对象,例如ConnectionFactory和Destinations。
  • Application Developer writes Producer and Consumer application and deploy it into Server.

    Application Developer编写Producer和Consumer应用程序并将其部署到Server中。
  • When client access JMS Sender component(program), JMS Sender lookups Administered Objects from JMS Provider JNDI Register and send messages to the Destination (example Queue).

    当客户端访问JMS Sender组件(程序)时,JMS Sender从JMS提供程序JNDI查找托管对象,然后将消息发送到目的地(示例队列)。
  • JMS Destination (either Queue or Topic) holds all JMS Messages (which are sent by JMS Sender) until they are consumed by Consumer.

    JMS目标(队列或主题)保留所有JMS消息(由JMS Sender发送),直到被使用者使用为止。
  • When client access JMS Receiver component(program), JMS Receiver lookups Administered Objects from JMS Provider JNDI Register and receive messages from the Destination (example Queue).

    当客户端访问JMS接收器组件(程序)时,JMS接收器从JMS提供程序JNDI查找托管对象,并从目标(示例队列)接收消息。
  • If the Messaging system(that is Server) crashes for some reasons, then System Administrator uses JMS Provider Admin Console to monitor, find the root cause of the problem, and restore messages into JMS Destinations.

    如果消息传递系统(即服务器)由于某些原因而崩溃,则系统管理员将使用JMS Provider Admin Console进行监视,查找问题的根本原因,并将消息还原到JMS目标中。
  • If there are any undelivered JMS Messages in Destinations (because of some Message Contract between Messaging systems), then System Administrator uses JMS Provider Admin Console to fix those message contract issues and re-send them into Destinations so that target Consumer can receive those messages and process them.

    如果目标中有任何未交付的JMS消息(由于消息系统之间存在某些消息协定),则系统管理员将使用JMS Provider Admin Console修复这些消息协定问题并将其重新发送到目标,以便目标使用者可以接收这些消息并处理它们。
  • If we use Durable or Persistent Destinations, then JMS Server uses JMS Stores to store undelivered messages.

    如果我们使用持久目标或持久目标,那么JMS Server将使用JMS存储来存储未传递的消息。
  • Durable or Persistent Destination stores messages until they deliver to all Subscribers and receive ACK from them.

    持久目标或持久目标存储消息,直到它们传递到所有订户并从它们接收ACK。
  • JMS Stores may be some kind of Flat Data files or some JMS Servers uses some kind of databases to store messages. Flat Data files may be XML files or text files.

    JMS存储可能是某种平面数据文件,或者某些JMS服务器使用某种数据库来存储消息。 平面数据文件可以是XML文件或文本文件。

NOTE:-
In Java EE 7 based applications, JMS Clients (JMS Sender or Receiver) do not lookup administered objects from JMS Provider.

注意:-
在基于Java EE 7的应用程序中,JMS客户端(JMS Sender或Receiver)不会从JMS Provider查找受管理的对象。

Instead, JMS Provider will inject them into JMS clients at required places by using Dependency Injection. We will discuss on this technique in advanced topics.

相反,JMS Provider将通过使用依赖注入将它们注入到所需位置的JMS客户端中。 我们将在高级主题中讨论此技术。

高级JMS架构 (High-Level JMS Architecture)

Typical JMS Applications have the following High-Level Architecture.

典型的JMS应用程序具有以下高级体系结构。

JAVA Sender Application uses JMS API to create Connection with JMS Server, create JMS Message and Send those to Destination.

JAVA Sender应用程序使用JMS API创建与JMS服务器的连接,创建JMS消息并将其发送到目的地。

In the same way, JAVA Receiver Application uses JMS API to create Connection with JMS Server, receive JMS Message and Send ACK (Acknowledgement) to Sender.

以相同的方式,JAVA接收器应用程序使用JMS API与JMS服务器创建连接,接收JMS消息并将ACK(确认)发送给发件人。

低级JMS架构 (Low-Level JMS Architecture)

Typical JMS Applications have the following Low-Level Architecture.

典型的JMS应用程序具有以下低级体系结构。

As shown in the above diagram, we can use same JMS Application in any JMS Provider with some minimal configurations at Server side.

如上图所示,我们可以在任何JMS提供程序中使用相同的JMS应用程序,并在服务器端进行一些最少的配置。

JMS API架构 (JMS API Architecture)

JMS API follows almost similar architecture. First Creating Connection with JMS Server then preparing Message/Receiving Message, process Message and closing Connection.

JMS API遵循几乎类似的体系结构。 首先使用JMS Server创建连接,然后准备消息/接收消息,处理消息并关闭连接。

The JMS Sender API Architecture

JMS Sender API架构

The JMS Receiver API Architecture

JMS接收器API架构

We will discuss JMS Sender and Receiver API in-depth in my coming posts.

我们将在我的后续文章中深入讨论JMS Sender和Receiver API。

That’s it all about JMS Architecture. We will discuss some more JMS Concepts in my coming posts.

关于JMS体系结构就是这样。 我们将在我的后续文章中讨论更多的JMS概念。

Please drop me a comment if you like my post or have any issues/suggestions.

如果您喜欢我的帖子或有任何问题/建议,请给我评论。

翻译自: https://www.journaldev.com/9768/jms-architecture-and-jms-api-architecture

jms架构

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值