What is the difference between historical SOW and bookmark replay?

The purpose of a SOW historical query is to get a historical view of the "most current" state of a set messages at a point in time. By contrast, a bookmark replay is intended to replay a set of messages starting at a point in time. These serve different purposes, and produce different results.

For example, consider the following set of messages (where the left column is the timestamp, the information in brackets is the message contents):

1 [id: 1, content: foo]
2 [id: 2, content: bar]
3 [id: 2, content: candy bar]
4 [id: 2, content: chocolate bar]

For simplicity, we will assume that the SOW is keyed on id and also assume that the granularity and window is such that all of these states are preserved in the history -- say, we have a 1m granularity and these messages were published 5m apart.

A historical replay that starts with a timestamp between 3 and 4 will see [id: 2, content: chocolate bar] (replaying from that point forward), but won't get a value for the message where id is 1, because there are no messages in the transaction log for that id after the point where replay started.

A historical SOW query between timestamp 3 and 4 will get [id: 1, content: foo] and [id: 2, content: candy bar], since those are the saved historical states of those SOW records at the point in the time queried.

You can also do a historical SOW and subscribe, which works exactly as you'd expect -- for the records above, a SOW and subscribe between 3 and 4 should get [id: 1, content: foo] and [id: 2, content: candy bar] in the SOW query, then [id: 2, content: chocolate bar] from the replay.

To figure out which one you need, the question is really whether you need to replay message streams (bookmark subscribe), or snapshots of the historical state of records (historical SOW), or both (historical SOW and subscribe).

Last updated