Is there a way to re-create all events? #1133
                  
                    
                      leandronsp
                    
                  
                
                  started this conversation in
                General
              
            Replies: 2 comments
-
| You don't want to re-publish the events - that would cause to handle them by every subscriber, even if they don't need to rebuild the state. You should do something as simple as  | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            -
| Great! That's exactly what I needed, thanks! | 
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.
-
Hi,
Maybe I didn't understand quite well some aspects of event sourcing, but I do guess that I can re-create all my data by simply running my events again.
Scenario:
UserCreatedUserReadModelSubscriberwhich subscribes to the eventUserCreated, then creates theUseron another tableEventshas 5 rowsI'd like to remove all Users (
User.destroy_all) then re-create them by running something like:Of course I get the error
EventDuplicatedInStream, but I don't know if I have this capability on this gem.Thanks for any help!
Beta Was this translation helpful? Give feedback.
All reactions