Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8883303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:46:53+00:00 2026-06-14T20:46:53+00:00

Do the events that occur when a command has executed in a CQRS-System have

  • 0

Do the events that occur when a command has executed in a CQRS-System have the same id as the Command, so that they can be associated to the command.

I´m currently implementing Saga´s in my CQRS-System and as far as i understand the concept of sagas is that they handle specific events to then define and execute commands to complete the process that is represented by the Saga.

My problem now is that how does the Saga know that the event that it is handling is the event it is waiting for.

Should i store the Id of the command that gets passed to the CommandBus in the Saga to wait for an event with the same Id? What if the execution of the command results in many diffrent events, do they all have the same Id?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:46:55+00:00Added an answer on June 14, 2026 at 8:46 pm

    For sagas, there has to be some correlating key on the constituent messages. Sometimes this can be a natural business domain key, such as OrderId. Other times a globally unique key is more appropriate such as a Guid. This key correlates messages related to a single task implemented by the saga.

    In your case it seems that this correlating ID is the ID of the command which starts the saga.

    Should i store the Id of the command that gets passed to the
    CommandBus in the Saga to wait for an event with the same Id?

    Yes. If you can assert that this ID is unique and fully identifies the task which the saga implements then this should be the correlating ID of the saga.

    What if the execution of the command results in many diffrent events,
    do they all have the same Id?

    They all share a correlation ID, but I don’t think of it as an ID for the event. The event may have an individual ID on its own, but for the saga to function, it has to have a correlation ID.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two backbone model change events that occur at the same time: change:path
I have a webpage that plays a 'chime' sound when certain events occur. Problem
I have a model of events that has various information such as date, location,
I have a web service that is used to manage various events that occur
I'm trying to enter events that occur over the same interval (Weekly, Bi-Monthly, Quarterly,
When I have nested objects, the timing of events that occur when a mouse
Here is a typical sequence of events that occur : Host device opens a
in wxpython, is there a event that can occur when one of the function
There are some events that I can use for handling drag & drop: https://developer.mozilla.org/en/DragDrop/Drag_and_Drop
I have a database of events that are used to fill a PHP calender.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.