How to move domain code if eventsourcing library records aggregate class path?

Viewed 19

I am exploring the eventsourcing library and wonder how to deal with source code structure changes, especially with renames and moves of aggregate classes in the domain. By default, the library uses a fully qualified class name including package and module name for the topic of stored events, e.g., event_sourcing_test.domain:Dog.Registered. When I move this class into a different module (let's say my_domain), the application can't reconstruct the aggregate anymore (e.g., when calling app.repository.get(...) with an appropriate aggregate id:

eventsourcing.utils.TopicError: Failed to resolve topic 'event_sourcing_test.domain:Dog.Registered': No module named 'event_sourcing_test.domain'

I understand that these aggregates need to be reconstructed by the specific event stream, however, I think there must be some way to also enable structural code changes without migrating the event store. I haven't found a hint in the documentation, I hope I didn't miss anything obvious.

0 Answers
Related