`

FuseESB Enterprise Messaging理论

 
阅读更多

1. The Embedded Messaging Service

     基于ActiveMQ, Fuse ESB Enterprise's messaging service提供了兼容JMS1.1规范的消息系统,包括一个消

     息Broker 和Clicen-side libraries(用于分布式客户端应用程序Communication).

2. Standard JMS Features

     (1) Point-to-Point (PTP): 使用queue作为Destinations.

     (2) Publish/Subscribe (Pub/Sub):使用topic作为Destinations.

     (3) Request/reply messaging:使用一个临时的Destinations作为Reply Message.

     (4) Persistent and nonpersistent messages.

     (5) JMS transactions:

     Fuse ESB Enterprise's messaging service支持JMS事务发生在Cleint和Broker.一个事务包含许多条消息作为

     一 个 Unit,如果这些消息中任何一条在事务中失败,那么Producer将回滚整个事务,Broker将flush所有已经

     Transacted 的消息;如果事物中的所有消息成功,那么Producer旧爱那个提交整个事务,Broker将

     Dispatcher所有已经Transacted的消息。

     (6) XA transactions:

      Fuse ESB Enterprise's messaging service支持XA transactions发生在Cleint和Broker.XA transactions工作类

      似与JMS Transaction, 除了XA transactions使用一个two-phase提交方式并且需要一个XA transactions

      Manager和persistent messaging.这是因为Broker需要将XA transaction中的每条消息写入一个persistent

      message store,相 对与本地缓存,直到Produce 调用commit(),推荐在当使用多个资源时使用该机制,如读

      取 一个消息并且写入DB。

3.  JMS Message Basics

      JMS消息解剖图:Figure 3.1. Anatomy of a JMS message Message.png.

      (1) Message body:Message, TextMessage, MapMessage, BytesMessage, StreamMessage,

      ObjectMessage.

      (2) Headers: 以JMS作为前缀;

      (3) Properties: JMS-defined properties (identified by JMSX prefix),vendor-specific properties (identified by

      the  JMSActiveMQBroker prefix).

4.  JMS Development

      (1) Basic application components:

      Connection factory,Connection,Session,Destinations,Producer,Consumer, Messages.

      (2) Simple broker program:Figure 3.2. Simple broker program.png.

5.  Figure 3.3. Network of brokers example.png.

  • 大小: 97 KB
  • 大小: 122.4 KB
  • 大小: 151.8 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics