Event handlers are pure and transparent functions that apply events to create application state.

Pure and transparent functions

Pure and transparent means that there are no side-effects and it is deterministic with the same input. Something functional programming languages like Elixir excel at!

They should not be confused with command handlers

Command handlers create events out of commands and validate commands.

Reference

Hoffman, Kevin. Real-World Event Sourcing: Distribute, Evolve, and Scale Your Elixir Applications. The Pragmatic Bookshelf, 2025. The Pragmatic Programmers.

Highlights or timestamps

Real-World Event Sourcing

The fundamental idea of Event Sourcing is that of ensuring every change to the state of an application is captured in an event object, and that these event objects are themselves stored in the sequence they were applied for the same lifetime as the application state itself. 000001

— highlight from Highlights of Real-World Event Sourcing