Chapter 9. Commands

This chapter covers

  • Understanding the role of commands in the unified log
  • Modeling commands
  • Using Apache Avro to define schemas for commands
  • Processing commands in our unified log

So far, we have concerned ourselves almost exclusively with events. Events, as we explained in chapter 1, are discrete occurrences that take place at a specific point in time. Throughout this book, we have created events, written them to our unified log, read them from our unified log, validated them, enriched them, and more. There is little that we have not done with events!

But we can represent another unit of work in our unified log: the command. A command is an order or instruction for a specific action to be performed in the future—each ...

Get Event Streams in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.