The message bus

The message bus lets you send messages between two or more clients. Smile publishes Java Message Service (JMS) messages to a message bus, and a listener filters the messages on the bus and retrieves the messages in which they are interested. Message bus communication is asynchronous, and there may be a delay between a client publishing a message and a listener receiving it.

Smile messages have the following components:
  • header—contains routing and identification information. Smile headers contain a smileMessageType string to help you filter the messages you listen for.
  • body—contains the data to exchange. Smile messages have a text message body that contains an XML document.

Smile sends messages to the message bus to notify listeners of changes to Smile objects, for example, updated subscriptions, completed orders or allocated transactions. Writing an application that listens for messages lets you synchronise changes in Smile across your network. For example, a listener can listen for transaction messages to update the report system or for provisioning messages that must be forwarded to an upstream provider.

Although Smile emits a message to confirm that a change is complete, the message does not imply that Smile was the application that made the change or that the change originated with a SOAP method. For example, Smile emits a message after a subscription is provisioned, but the provisioning can occur at an upstream provider. Similarly, Smile emits the same message when a subscription is updated by a SOAP method or in Smile.

Although Smile publishes JMS messages, you do not need Java to receive the messages. However, your message broker must be JMS compatible and have a GlassFish resource adapter.