Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Event-driven architecture: What is an event?

December 19, 2019
Hugo Guerrero
Related topics:
Event-drivenMicroservices
Related products:
Streams for Apache KafkaRed Hat Fuse

    When we talk about events in an event-driven architecture (EDA), we are referring to unusual or important actions or incidents (i.e., changes in state) that occur in the system generated by the system’s software or hardware components. For the purposes of this article, when we refer to an event, we mean an event notification (the notification that something has changed). As the event is generated in one of the architecture components, and the notification placed in the event management bus, the communication pattern used to share the notification between the components also defines the nature of the message enclosing the event.

    In event-driven architecture, various events are broadcast across the event management bus. If you step back and look at all the asynchronous data, you will find more than just notifications. You also will find common communication types that should be taken into consideration when designing a proper cloud-native EDA.

    Based on the type of communication, events should be handled differently in order to achieve best performance and flexibility. Suitable processing and communication technologies should be chosen according to the type of events encountered; there is no "one size fits all" solution.

    Event

    We will define a software event as the immutable record that something happened within an application. The event usually will contain the local timestamp to enable ordering to be preserved with respect to the producing application. An event may contain identifiers and state information related to a particular entity of interest. In Domain Driven Development (DDD), events are referred to as Value Objects.

    Normally events are broadcast to notify of change or replicate state across multiple applications. Consumers are able to process events asynchronously; there is no need for them to be available when the event was created.

    An example of an event with state information is one generated when a customer updates their address. The event will contain the customer identifier and new address (state). Consumers of the event are able to update the relevant details asynchronously—billing, marketing mailings, etc. The loose coupling allows the producing application to complete without waiting for the remote updates to apply.

    Command

    A command is an asynchronized form of Remote Procedure Calls (RPC) in which the message contains instructions telling the consumer what to do. This may cause a change of state in the system and normally the status will be returned to the initial producer. Sometimes command events may result in complex transactions and the ability to roll back is crucial. The saga pattern of transactions is commonly used in applications making use of command events. The properties of the communication technology and timeouts must be well understood when using commands. Also note that at least one consumer must be available to process the message in an acceptable time frame.

    An example of a command event might be to buy a certain number of stocks. The corresponding response event would indicate that the trade had succeeded or failed.

    Query

    Queries are similar to commands, except they expect a response containing the current state of an entity rather than causing state change. The query pattern is able to operate on a read-only dataset and duplicated queries are tolerated as the event is idempotent. Caches are frequently used in the query pattern to enable a faster response time and, as with commands, at least one consumer must be available to respond to the event.

    Event-driven architecture

    The type of events produced and consumed by your applications will be key to craft a successful event-driven architecture. To learn more on the basics of EDA, visit the event-driven architecture topic page.

    Last updated: January 10, 2022
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.