code: @Override
    public ReadSideHandler<BlogEvent> buildHandler() {
  
      return new ReadSideHandler<BlogEvent>() {
  
        @Override
        public CompletionStage<Done> globalPrepare() {
          return myDatabase.createTables();
        }
  
        @Override
        public CompletionStage<Offset> prepare(AggregateEventTag<BlogEvent> tag) {
          return myDatabase.loadOffset(tag);
        }
  
        @Override
        public Flow<Pair<BlogEvent, Offset>, Done, ?> handle() {
          return Flow.<Pair<BlogEvent, Offset>>create()
                  .mapAsync(1, eventAndOffset ->
                          myDatabase.handleEvent(eventAndOffset.first(),
                                  eventAndOffset.second())
                  );
        }
      };
    }
docs: #build-handler