replayCallback must be side-effect free? I think this should be documented.