Skip to content

Commit b384d3d

Browse files
author
Alan Christie
committed
docs: Better doc
1 parent 46105d0 commit b384d3d

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,16 @@ for clarity: -
213213
}
214214

215215
- The `"timestamp"` in the `"message_body"` is the date/time and timezone string
216-
representation of the time the message was created (in the merchant or AS).
216+
representation of the time the message was created (in the Merchant or AS).
217217
Every message will contain a timestamp value.
218218

219219
- The `"ess_timestamp"` is a RabbitMQ-generated numerical value.
220220
it is not necessarily the same as the message `"timestamp"`.
221+
It is a measurement of milliseconds since the universal time epoch (1 Jan, 1970).
221222

222223
- The `"ess_ordinal"` is a unique increasing value that represents the position of
223-
the message in the underlying RabbitMQ stream in which is held.
224+
the message in the underlying RabbitMQ stream in which is held with the first message
225+
in the stream having an offset of `1`.
224226

225227
To distinguish between "old" and "new" messages you should use either the
226228
`"ess_ordinal"` or `"ess_timestamp"`, they are guaranteed monotonic.
@@ -251,10 +253,12 @@ event after the given reference. For example, if you provide **ordinal** `100`,
251253
the next event you can expect to receive is an event with **ordinal** `101`.
252254

253255
- To stream from a specific **ordinal**, provide it as the numerical value
254-
of the request parameter `stream_from_ordinal`.
256+
of the request parameter `stream_from_ordinal`. Passing in a value of `0`
257+
will ensure you receive the first message in the stream (which has an ordinal of `1`)
255258

256259
- To stream from a specific **timestamp**, provide it as the numerical value
257-
of the request parameter `stream_from_timestamp`.
260+
of the request parameter `stream_from_timestamp`. It is interpreted
261+
as a measurement of milliseconds since the universal time epoch (1 Jan, 1970).
258262

259263
- To stream from a specific **datetime**, provide the date/time string as the value
260264
of the request parameter `stream_from_datetime`. The datetime string is extremely
@@ -264,7 +268,7 @@ the next event you can expect to receive is an event with **ordinal** `101`.
264268
it is `13:33`, and you want to retrieve times from 13:33 (local time), then you
265269
will need to provide a string value that has the date you are interested in,
266270
and the time set to `11:33` (the UTC time for 13:33 CEST) or specify `13:33+02:00`.
267-
The value is translated to the nearest approximate `timestamp` value.
271+
Internally, the value is translated to the nearest approximate `timestamp` value.
268272

269273
You can only provide one type of historical reference. If you provide a
270274
value for `stream_from_ordinal` for example, you cannot also provide

0 commit comments

Comments
 (0)