message driven vs. event driven approaches to application integration
I was wondering if there is a clear distinction between message driven and event driven environments when we refer to SOA or middleware and generally in cases of application and enterprise integration. I understand that a user interface resembles an event driven model where our system intercepts action by the user.
Also it is clear that messaging supports systems based on publish/subscribe, sychronous or asynchronous communication, transactions etc.
But is there a difference in the middleware/soa/application intergration context? (architecture level). I am trying to consult sources such wikipedia (here, and here), but I am still somewhat confused. When should a developer prefer one solution over the other?
Are there examples or cases where one approach makes more sense than the other? Or any comprehensive resources and guides to implementing each one?
Many thanks for any insight.
Here is a Typesafe/Reactive point of view on the question from Jonas Bonér. From the third paragraph of this blog post:
The difference being that messages are directed, events are not — a message has a clear addressable recipient while an event just happen for others (0-N) to observe it.
This question was asked long time ago. I think a more modern and clear response is given by the Reactive Manifesto in Message-Driven (in contrast to Event-Driven):
A message is an item of data that is sent to a specific destination. An event is a signal emitted by a component upon reaching a given state. In a message-driven system addressable recipients await the arrival of messages and react to them, otherwise lying dormant. In an event-driven system notification listeners are attached to the sources of events such that they are invoked when the event is emitted. This means that an event-driven system focuses on addressable event sources while a message-driven system concentrates on addressable recipients. A message can contain an encoded event as its payload.