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

How to replay all the events for certain service? #5

Open
smilingleo opened this issue Sep 20, 2018 · 0 comments
Open

How to replay all the events for certain service? #5

smilingleo opened this issue Sep 20, 2018 · 0 comments

Comments

@smilingleo
Copy link

Let's say orderservice crashed and lost all the data (not in this example, since order and customer share same db here), how can we replay all the events and restore its latest state?

In io.eventuate.local.db.log.common.DbLogBasedCdcProcessor,

  public void start(Consumer<EVENT> eventConsumer) {
    Optional<BinlogFileOffset> startingBinlogFileOffset = offsetStore.getLastBinlogFileOffset();

    process(eventConsumer, startingBinlogFileOffset);
  }

The offsetStore always seeks to the latest offset even though its consumer starts at the earliest.

I guess we can either make it configurable or provide a different implementation of the CdcProcessor.

But the question is, while we replay all the events, the orderservice will emit new events as well, and those events are already published and stored in the event store. So, what do we do? publish them to a separated Topic? What's the recommended operation? Or, is it really practical?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant