Chapter 5. Consuming the events
In this chapter, the focus shifts from event producers to their mirror image: event consumers, the entities that accept event objects from an event processing network and act on them. The chapter explains the consumer definition element as the model’s representation of a consumer node, emphasizing that it describes only how the consumer connects to the network, not the consumer’s internal logic. It can stand for an abstract type, a class of instances, or a single concrete instance, and its description includes identifying details, input terminals, and relationships to other consumer definitions.
The text then broadens into the main kinds of consumers and how they are used in practice. Hardware consumers are described as actuators that carry out physical actions in response to events, such as opening valves or controlling machinery. Human-facing consumers include alerting systems, dashboards, visual displays, feeds, and social-network notifications, all of which present event information in ways suited to monitoring or decision support. Software consumers include event logs for diagnostics and audit trails, as well as business applications and BPM or workflow systems that use events to start, stop, or advance business processes.
The chapter also explains how consumers interact with the rest of the network, especially when a consumer definition represents a class of multiple instances. In such cases, consumers may be dynamically subscribed and unsubscribed, and events may need routing to only the relevant members of the class based on event attributes and filters. The final example applies these ideas to the Fast Flower Delivery application, where drivers, stores, and the Drivers’ Guild are modeled as consumers with different terminals and event types. Overall, the chapter concludes by showing how consumer modeling helps connect event processing to real-world actions, user interfaces, and business systems.
An event consumer with two input terminals
The event consumer definition element contains details about the definition element itself, a list of input terminals, and a list of relationships to other event consumer definitions.
An event consumer with an explicitly modeled channel as the source for its input terminal
Kinds of event consumers encountered in event processing applications
Performance monitoring dashboard. This event consumer takes a variety of performance measurement events and displays them as graphs.
A dashboard screen showing the use of color-coding to indicate out-of-line situations. The window at the top right indicates that all the resources being monitored exceeded the maximum acceptable value for path latency.
The Ambient Orb. The orb can be programmed to change color to reflect the general health of an organization, or to show the status of a specific key indicator.
A visual display from a location tracking application. The individual markers show the positions that a particular vehicle (in this case a bus) has visited in the previous 24 hours.
Twitter can be used to report the position of a vehicle.
A simple business process modeled using BPMN. A process instance is created when a new order is received and proceeds through a sequence of activities.
Event Processing in Action ebook for free