CrossDomainSaga : Unable to invoke IReadModeLocator #880
Unanswered
DureSameen
asked this question in
Q&A
Replies: 1 comment
-
Hi @DureSameen its been a while, did you figure out a solution? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am in the process of creating a CrossdomainSaga through rabbitmq messaging, Application A . creates a domain event as "SagaConsultantCreateEvent" on RabbitMq , the other application Application B subscribe to a "SagaQueue".
Then I created a DomainEventPublisher, which invoke AllEventsSubscriber successfully. This subscriber add consultant in eventstore successfully but unable to invoke IReadModelLocator.
A) The AllEventsSubscriber is listed as below
`
public class AllEventsSubscriber : ISubscribeSynchronousToAll
{
private readonly ILogger _logger;
private readonly IBootstrapper _bootstrapper;
private readonly IConsultantManagementApplicationService _consultantManagementApplicationService;
public AllEventsSubscriber( ILogger logger, IBootstrapper bootstrapper,
IConsultantManagementApplicationService consultantManagementApplicationService)
{
_logger = logger;
_bootstrapper = bootstrapper;
_consultantManagementApplicationService = consultantManagementApplicationService;
_bootstrapper.StartAsync(CancellationToken.None).Wait();
}
}`
B) In ConsultantManagementApplicationService, the add event is added as following
C) ConsultantLocator is defined as following
`public class ConsultantLocator : IReadModelLocator
{
d) In Startup locator is tied to readModel.
.RegisterServices(sr => sr.RegisterType(typeof(ConsultantLocator))) .UseElasticsearchReadModel<ConsultantReadModel, ConsultantLocator>()
Beta Was this translation helpful? Give feedback.
All reactions