Does DCP have any incermenting sequence number for each event?

Suppose I’m consuming DCP mutation messages using the DCP client. I need a number that is incrementing for every message. Notice that this has nothing to do with the order that records are inserted in the database. This is not important. It also has nothing to do with atomic counters. The only guarantee I need is that if DCP delivers me message “A” and AFTER message “A”, it delivers message “B”, message B must have a GREATER sequence number than A. The sequence number does not have to be evenly spaced either. It can be something like 10, 17, 19, 39, 115, 120, 121.

Thanks

Note that DCP is not a supported, public interface. That said it’s Open Source so…

There is a sequence number per vbucket. In certain failure situations though, it can go backwards with a failover log. Some details of this are in some architectural notes on github.

I’m curious, what are you looking to do with the DCP client that you need sequences for? I can probably give you some better guidance with an understanding of the use case.