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 7832221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T12:06:06+00:00 2026-06-02T12:06:06+00:00

My saga below is not handling the ValidateRegistration and ValidateRegistration commands. I see the

  • 0

My saga below is not handling the ValidateRegistration and ValidateRegistration commands. I see the “Could not find a saga for the message type Registrations.Messages.ValidateRegistration with id …” message.

Is my configuration to find saga not correct? Please help!

Thanks

PS: I am using the generic host in the registration process and I am using NServiceBus.Lite profile.

public class EndpointConfig : IConfigureThisEndpoint, AsA_Publisher, IWantCustomInitialization
{
    #region Implementation of IWantCustomInitialization

    public void Init()
    {
        var kernel = new StandardKernel();
        kernel.Load(new BackendModule());

        //Configure.Instance.Configurer.ConfigureProperty<RegistrationSaga>(x => x.Factory, kernel.Get<IAggregateRootFactory>());
        Configure.With().NinjectBuilder(kernel);
    }

    #endregion
}

public class RegistrationSagaData : IContainSagaData
{
    #region Implementation of ISagaEntity

    public virtual Guid Id { get; set; }
    public virtual string Originator { get; set; }
    public virtual string OriginalMessageId { get; set; }

    public virtual RegistrationID RegistrationID { get; set; }
    public virtual bool IsValidated { get; set; }
    public virtual string RegistrationType { get; set; }

    #endregion
}

public class RegistrationSaga : Saga<RegistrationSagaData>,
                                IAmStartedByMessages<StartRegistration>,
                                IHandleMessages<ValidateRegistration>,
                                IHandleMessages<CancelRegistration>
{
    public RegistrationFactory Factory { get; set; }

    public override void ConfigureHowToFindSaga()
    {
        ConfigureMapping<StartRegistration>(data => data.RegistrationID, registration => registration.ID);
        ConfigureMapping<ValidateRegistration>(data => data.RegistrationID, registration => registration.ID);
        ConfigureMapping<CancelRegistration>(data => data.RegistrationID, registration => registration.ID);
    }

    #region Implementation of IMessageHandler<StartRegistration>

    public void Handle(StartRegistration message)
    {
        Data.IsValidated = false;
        Data.RegistrationType = message.RegistrationType;

        Bus.SendLocal(new CreateRegistration
        {
            RegistrationType = message.RegistrationType,
            ID = message.ID
        });

        Console.WriteLine("======> handled StartRegistration");
    }

    #endregion

    #region Implementation of IMessageHandler<ValidateRegistration>

    public void Handle(ValidateRegistration message)
    {
        MarkAsComplete();

        Console.WriteLine("======> handled ValidateRegistration");
    }

    #endregion

    #region Implementation of IMessageHandler<CancelRegistration>

    public void Handle(CancelRegistration message)
    {
        Console.WriteLine("======> handled CancelRegistration");

        MarkAsComplete();
    }

    #endregion
}
  • 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-02T12:06:12+00:00Added an answer on June 2, 2026 at 12:06 pm

    Your handler for StartRegistration is not adding RegistrationID to the Saga’s Data. So your override of ConfigureHowToFindSaga is mapped on a property that’s has no value when the other commands are handled.

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

Sidebar

Related Questions

I have an agent that employs a saga to track incoming messages of a
I am not using the nhibernate saga persistence and hence I do not need
Are there any reasons not to reuse an NServiceBus message ( IMessage ) in
If I have a saga that consists of two message types, say started by
Process order: Saga message handler receives first message containing data items. Message handler uses
My MassTransit saga has only one field that will not map correctly. It is
Heres my saga - I'm trying to link http://www.example.com to my shopping cart on
We're using RavenDB saga storage, but the saga data isn't being persisted after the
As part of my ongoing JDBC/Oracle saga, I solicited the help of one of
In NServiceBus 3.0.3 I have written a saga. Based on what I'm seeing in

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.