Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events in different domains with same name #668

Closed
DaGrisa opened this issue Jul 26, 2019 · 3 comments
Closed

Events in different domains with same name #668

DaGrisa opened this issue Jul 26, 2019 · 3 comments
Labels

Comments

@DaGrisa
Copy link
Contributor

DaGrisa commented Jul 26, 2019

We think that we found a problem with deserializing events that have the same name, but live in different domains. When deserializing EventFlow mixes up the classes.

Example
Domain A => A.DataCreatedEvent
Domain B => B.DataCreatedEvent
Deserializing A.DataCreatedEvent results in B.DataCreatedEvent

Maybe you can investigate a little bit more, we don't have the issue anymore, because the requirements changed so that we don't have the events with the same name anymore.

@DaGrisa DaGrisa changed the title Event in different domains with same name Events in different domains with same name Jul 26, 2019
@rasmus
Copy link
Member

rasmus commented Jul 29, 2019

@DaGrisa as a work around you could have a look at the EventVersion attribute for events. It makes it possible to use different string names for events, e.g. prefix each event name with the domain.

Here's an example on usage
https://github.com/eventflow/EventFlow/blob/develop/Source/EventFlow.Tests/UnitTests/EventStores/EventDefinitionServiceTests.cs

@rasmus
Copy link
Member

rasmus commented Feb 25, 2022

Related to #907

@rasmus
Copy link
Member

rasmus commented Mar 4, 2022

Closing this as its a duplicate

@rasmus rasmus closed this as completed Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants