Change stream resume token

Hi, we are utilizing change streams and resuming these streams with the resume token received from the change event. We store the resume token in Redis with a TTL. If the service restarts or crashes, it attempts to reopen the stream using the resume token. However, I’ve encountered a problem: if my collection doesn’t receive updates for a while (the token can lag behind the oplog), then the stream will throw an error. This behavior is consistent with your documentation. However, I’m curious if I can use the resume token from the resumeTokenChanged event instead. I’ve noticed that I receive it every second. Would this ensure that the resume token always remains aligned with the oplog?

Additionally, I’ve observed that the resume tokens I receive every second from the listener appear slightly different. Could you explain the difference between them?

Are there any advantages or disadvantages to using one type of token over the other? Could you please provide more details? I couldn’t find any information about the token received from resumeTokenChanged.