EventFlow icon indicating copy to clipboard operation
EventFlow copied to clipboard

EventStore ReadAllEventsForwardAsync is populating all of the data from all services

Open DureSameen opened this issue 5 years ago • 4 comments

We have a single eventstore connected to all microservices. Now we are creating a data retrieval logic, to populate a microservice data in the startup. But the following line populating all data even from other services too. so it is causing exception in serialization

allEventsSlice = await _connection.ReadAllEventsForwardAsync(nextPosition, pageSize, false) ;

How can we populate a single type only i-e only from following types.

var typeList = _dataRetrievalConfiguration.ReadModelAssembly.DefinedTypes.Where(type => type.Name != "LookUpEnumReadModel" && !type.IsInterface && !type.IsAbstract && type.ImplementedInterfaces.Any(inter=> inter == typeof(IReadModel))).ToList(); typeList.ForEach(async x => { await _populator.PopulateAsync(x, cancellationToken); });

DureSameen avatar Nov 03 '20 13:11 DureSameen

Hi @DureSameen I'm not very familiar with EventStore, but would you be able to create a small exploratory test that illustrate your problem?

If there is a but, we'll need a fix for it.

rasmus avatar Nov 06 '20 12:11 rasmus

I have created two microservices

https://github.com/DureSameen/EventFlowWithElasticSearch/tree/DataRetreveial https://github.com/maree16/EventFlowForOrganization

The first one include logic of data retrieval.

  1. Create environment variables. as described in readme.
  2. Add some data using both api
  3. Turn on data retrieval switch in write api ,
  4. All data from eventstore will read to the data retrieval routine.

DureSameen avatar Nov 24 '20 09:11 DureSameen

any progress on this issue?

DureSameen avatar Jan 06 '21 08:01 DureSameen

Hi @DureSameen none. The EventStore part of EventFlow is mainly maintained by others. Would you be up for doing a pull request for it?

rasmus avatar Jan 11 '21 12:01 rasmus

Hello there!

We hope you are doing well. We noticed that this issue has not seen any activity in the past 90 days. We consider this issue to be stale and will be closing it within the next seven days.

If you still require assistance with this issue, please feel free to reopen it or create a new issue.

Thank you for your understanding and cooperation.

Best regards, EventFlow

github-actions[bot] avatar Apr 08 '23 13:04 github-actions[bot]

Hello there!

This issue has been closed due to inactivity for seven days. If you believe this issue still needs attention, please feel free to open a new issue or comment on this one to request its reopening.

Thank you for your contribution to this repository.

Best regards, EventFlow

github-actions[bot] avatar Apr 16 '23 09:04 github-actions[bot]