add checkpointing logic and tests to subscription