I'm quite new to DDD and Event Driven architectures. And after searching this issue I did not manage to get a clear answer by myself, so I'll appreciate if someone can clarify this.
Suppose I currently have an app with 2 bounded contexts. ContextA emits some InterestingEvent that propagates through an integration event to ContextB. This allows ContextB to have its own representation about some eventual state each time this event is emitted and picked up.
So far so good.
But this happy path assumes that ContextA and ContextB have always existed or ContextB has always been subscribed to the InterestingEvent.
Suppose now ContextA existed a while before ContextB... or they both existed, but ContextB was not subscribed initially to InterestingEvent. As a result from this, a number of InterestingEvents have already happened when ContextB goes online or subscribes to the event.
What are the strategies for ContextB to deal with this "first sync" or "past events" situation?
Some crazy thoughts:
Is ContextA suppose to replay all events ContextB requires to be up to date? That could be problematic in the sense that some of this events may have side effects in other contexts as well.
Do ContextB may ask for an update batch from ContextA at bootstrap? Kind of a fat-full-state Godzilla event that carries all the state ContextB needs to be on sync?
Thanks in advance.