Using messaging in a Flex application

A Flex client application uses the client-side messaging API to send messages to, and receive messages from, a server-side destination. Messages are sent to and from destinations over a protocol-specific message channel. er

The two primary client-side messaging components are Producer and Consumer components. A Producer component sends messages to a server-side destination. A Consumer component subscribes to a server-side destination and receives messages that a Producer component sends to that destination. You can create Producer and Consumer components in MXML or ActionScript.

Producer and Consumer components both require a valid message destination that you configure in the Flex services configuration file. For information about message destinations, see Configuring the Message Service.

A Flex application often contains at least one pair of Producer and Consumer components. This enables each application to send messages to a destination and receive messages that other applications send to that destination. It is very easy to test this type of application by running it in different browser windows and sending messages from each of them.


Flex 2.01

Take a survey