Skip to content

Commit 46105d0

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

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,26 @@ for clarity: -
212212
}
213213
}
214214

215+
- 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).
217+
Every message will contain a timestamp value.
218+
219+
- The `"ess_timestamp"` is a RabbitMQ-generated numerical value.
220+
it is not necessarily the same as the message `"timestamp"`.
221+
222+
- 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+
225+
To distinguish between "old" and "new" messages you should use either the
226+
`"ess_ordinal"` or `"ess_timestamp"`, they are guaranteed monotonic.
227+
Consecutive messages may not have increasing `"timestamp"` values but they will have
228+
increasing `"ess_timestamp"` and increasing `"ordinal"` values. This is because the DM
229+
and AS both generate messages that you might see. Even if their clocks are synchronised
230+
the DM messages have to pass through a queue and socket (and transmission is not
231+
instantaneous) so you can expect messages to be delayed with respect to those generated
232+
on the AS. To guarantee not miss a message you must use the `"ordinal"`.
233+
If you cannot, use the `"ess_timestamp"`.
234+
215235
## Version 3
216236
Version 3 uses **params** for the specification of historical events. Version 2
217237
used header values to provide these values.
@@ -243,7 +263,8 @@ the next event you can expect to receive is an event with **ordinal** `101`.
243263
UTC value if it has no timezone specification. If you are in CEST for example, and
244264
it is `13:33`, and you want to retrieve times from 13:33 (local time), then you
245265
will need to provide a string value that has the date you are interested in,
246-
ans the time set to `11:33` (the UTC time for 13:33 CEST) or specify `13:33+02:00`.
266+
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.
247268

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

0 commit comments

Comments
 (0)