One of Adobe Flex’s notable features was how easily it could use messaging services. On the client, the <mx:Producer /> and <mx:Consumer /> components abstracted much of the communication with a back-end data service.

In the Java ecosystem, common choices included LiveCycle Data Services and the open source BlazeDS. This example used Java with BlazeDS to create a chat whose Flex interface contained fewer than 20 lines of code—not counting server configuration.

Original example structure

  1. Configure a streaming channel, or an AMF channel with polling, in services-config.xml.
  2. Create a destination named chatMessage in messaging-config.xml.
  3. Register the messaging configuration in BlazeDS.
  4. Build the interface with a Producer to send messages and a Consumer to receive them.
  5. Start the web server and open the chat in two different browsers or sessions.

Partially unavailable code: both the WordPress export and the current public page contain empty configuration and MXML blocks. Because the missing content could not be verified, I did not reconstruct or invent it.

Original ChatApp interface