Understanding the Flex messaging architecture

 

Flex messaging lets a Flex application connect to a message destination, send messages to it, and receive messages from other messaging clients. Those messaging clients can be Flex applications or other types of clients, such as Java Message Service (JMS) clients. JMS is a Java API that lets applications create, send, receive, and read messages. JMS clients can publish and subscribe to the same message destinations as Flex applications. This means that Flex applications can exchange messages with Java client applications. However, you can create a wide variety of messaging applications using just Flex messaging.

The following image shows a simplified view of the messaging architecture:



Subtopics

Flex Message Service Message channels JMS message adapter

Flex Message Service

The four components of the Flex Message Service are channels, destinations, producers, and consumers. When a Flex client application uses the ActionScript or MXML messaging API to publish a message to a destination, the client application sends the message to the server-side Message Service.

The Flex Message Service provides an abstraction on top of the transport protocols that Adobe Flash Player supports, such as Action Message Format (AMF), Realtime Message Protocol (RTMP), and XMLSocket. You configure the Message Service to transport messages over one or more channels. Each channel corresponds to a specific transport protocol. Within the Flex services configuration file, you specify which channels to use for a specific destination.

Message channels

Flex applications can access the Flex Message Service over several different message channels. Each channel corresponds to a specific network protocol and has a corresponding server-side endpoint. There is client-side code that corresponds to each channel. When a message arrives at an endpoint, the endpoint decodes the message and passes it to a message broker, which determines where the message should be sent. For publish-subscribe messaging scenarios, the message broker sends messages to the Message Service. The message broker also routes messages for the Flex remote procedure call (RPC) service and Data Management Service features. The Flex client tries the channels in the order specified until an available channel is found or there are no more channels in the list.

For more information about message channels, see Message channels.

JMS message adapter

JMS is a Java API that lets applications create, send, receive, and read messages. Flex messaging uses the JMS message adapter to interact with external messaging systems.

This adapter lets Flex applications subscribe to JMS topics and queues. It allows Flex applications to participate in existing messaging oriented middleware (MOM) systems.

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值