Enterprise Integration Patterns
Messaging Patterns
HOME PATTERNS RAMBLINGS ARTICLES TALKS DOWNLOAD BOOKS CONTACT
Messaging Patterns
Event MessageEvent MessageMessaging Patterns » Message Construction

Several applications would like to use event-notification to coordinate their actions, and would like to use Messaging to communicate those events.

How can messaging be used to transmit events from one application to another?

Use an Event Message for reliable, asynchronous event notification between applications.

When a subject has an event to announce, it will create an event object, wrap it in a message, and send it on a channel. The observer will receive the event message, get the event, and process it. Messaging does not change the event notification, just makes sure that the notification gets to the observer.

The difference between an Event Message and a Document Message is a matter of timing and content. An event’s contents is typically less important. Many events are empty; their mere occurrance tells the observer to react. An event’s timing is very important; the subject should issue an event as soon as a change occurs, and the observer should process it quickly while it’s still relevant. Guaranteed Delivery is usually not very helpful with events because they’re frequent and need to be delivered quickly. Message Expiration can be very helpful to make sure that an event is processed quickly or not at all.

... Read the entire pattern in the book Enterprise Integration Patterns

Related patterns:

Command Message, Document Message, Durable Subscriber, Remote Procedure Invocation, Guaranteed Delivery, Message, Message Expiration, Messaging, JMS Publish/Subscribe Example, Point-to-Point Channel, Publish-Subscribe Channel


Creative Commons Attribution License

You can reuse the following elements under the Creative Commons Attribution license: pattern icon, pattern name, problem and solution statements (in bold), and the sketch. Other portions are protected by copyright.

Enterprise Integration Patterns book cover

Enterprise Integration Patterns
The de-facto language for designing asynchronous, distributed systems. Over 100,000 copies sold.

Software Architect Elevator book cover

The Software Architect Elevator
Rethink the role of architects as a connecting element across organizational layers. Acquire the technical, communication, and organizational skills to succeed in this new role.

Cloud Strategy book cover

Cloud Strategy
Make your cloud migration a success by translating high-level goals into conscious decisions with well-understood trade-offs.

Platform Strategy book cover

Platform Strategy
Platforms can boost innovation through harmonization, but they aren't easy to build. Learn from over a decade of designing and rolling out IT platforms.