More documentation on _changes feed message formats?

Is there any documentation that details the format of all messages that could be received via the _changes feed? For example, when “include_docs” is set to false, this is the format of the message that is delivered:

    "seq": "126240::127341",
    "id": "websocket36",
    "changes": [
        "rev": "1-18ed60a314965eeddfc0d71971651c53"

The “changes” property above is an array with other objects as elements with on “rev” property… are there other potential values that can be in this “changes” array? When would there be multiple elements in the changes array? What does the sequence format mean (126240::127341) ?

Any details or documentation would be helpful.

Yes. Only rev

When you have conflicts, you can return all leaf node revisions by setting style to all_docs. Default returns only winning revision.

Every change is associated with a seq Id used by the replicator protocol. The app shouldn’t really be concerned with the details. But if you are curious, the 126240 is the lowest continuous sequence seen and 127341 is the actual seq Id of the change.


Is there any ordering guarantee when using web sockets to consume the changes feed? Will sequences come in sequential order?

To add to what @priya.rajagopal said, so unfortunately there isn’t any complete list of all the changes feed messages. There’s least one type of pseudo-update needed for user management that looks like this:

  "results" : [ {
    "seq" : 1,
    "id" : "_user/",
    "changes" : [ {
      "rev" : ""
    } ]
  } ],
  "last_seq" : "1"

That’s easy to filter, of course. Just know to check the “rev” field has real content before depending on it.

@adamf can give the most definitive answer, so pinging him.

I also started this project to help understand how the changes feed reacts:
It’s crude and needs work, but might be helpful.

Thanks for the info, Hod.