@@ -181,26 +181,26 @@ RabbitMQ Topic Queue.
181181Version 2 uses the ` rstream ` package and relies on a RabbitMQ stream.
182182
183183Version 2 also extends messages prior to forwarding them to their socket clients.
184- It does this by appending the messages's ** offset ** in the stream (an ` integer ` ,
185- which we refer to as an ** ordinal ** )) , and the message's ** timestamp** (also an ` integer ` ),
186- both of which are provided by the backing RabbitMQ stream as the messages are received
187- by the Event Stream's consumer. The ** offset ** can be used as a unique message identifier.
184+ It does this by appending the messages's ** ordinal ** (an ` integer ` , its _ offset _ in the
185+ stream) , and ** timestamp** (also an ` integer ` ), both of which are provided by the
186+ backing RabbitMQ stream as the messages are received.
187+ The ** ordinal ** can be used as a unique message identifier.
188188
189189When received as a protobuf string the values are appended to the end of the original
190190message using ` | ` as a delimiter. Here is an example, with the message split at the
191191delimiter for clarity: -
192192
193193 accountserver.MerchantProcessingCharge
194194 |timestamp: "2025-04-30T19:20:37.926+00:00" merchant_kind: "DATA_MANAGER" [...]
195- |offset : 2
195+ |ordinal : 2
196196 |timestamp: 1746042171620
197197
198198JSON strings will have these values added to the received dictionary using the
199- keys ` ess_offset ` and ` ess_timestamp ` , again, displayed here over several lines
199+ keys ` ess_ordinal ` and ` ess_timestamp ` , again, displayed here over several lines
200200for clarity: -
201201
202202 {
203- "ess_offset ": 2,
203+ "ess_ordinal ": 2,
204204 "ess_timestamp": 1746042171620,
205205 "message_type": "accountserver.MerchantProcessingCharge",
206206 "message_body": {
@@ -223,20 +223,20 @@ You can select the start of your events buy providing either an **ordinal**,
223223event after the given reference. For example, if you provide ** ordinal** ` 100 `
224224the next event you can expect to receive is an event with ** ordinal** ` 101 ` .
225225
226- - To stream from a specific ** ordinal** ( ** offset ** ) , provide it as the numerical value
226+ - To stream from a specific ** ordinal** , provide it as the numerical value
227227 of the header property ` X-StreamOffsetFromOrdinal ` .
228228
229229- To stream from a specific ** timestamp** , provide it as the numerical value
230230 of the header property ` X-StreamOffsetFromTimestamp ` .
231231
232232- To stream from a specific ** datetime** , provide the date/time string as the value
233233 of the header property ` X-StreamOffsetFromDatetime ` . The datetime string is extremely
234- flexible and is interpreted by the ** python-dateutil** package's ` parse ` function.
235- UTC is used as the reference for messages and the string will be interpreted as a
236- UTC value if it has no timezone specification. For example, if you are in CEST and
237- it is ` 13:33 ` and you want to retrieve times from 13:33 (local time) then you will need
238- to provide a ** datetime ** string value that has the time set to
239- ` 11:33 ` (the UTC time for 13:33 CEST) or specify ` 13:33+02:00 `
234+ flexible and is interpreted by the [ python-dateutil] package's ` parse ` function.
235+ UTC is used as the reference for messages, and the string will be interpreted as a
236+ UTC value if it has no timezone specification. If you are in CEST for example, and
237+ it is ` 13:33 ` , and you want to retrieve times from 13:33 (local time), then you
238+ will need to provide a string value that has the date you are interested in,
239+ ans the time set to ` 11:33 ` (the UTC time for 13:33 CEST) or specify ` 13:33+02:00 ` .
240240
241241You can only provide one type of historical reference. If you provide a header
242242value for ` X-StreamOffsetFromOrdinal ` for example, you cannot also provide
@@ -271,4 +271,5 @@ on event message size, should be able to retain events for several days.
271271[ fastapi ] : https://fastapi.tiangolo.com
272272[ pre-commit ] : https://pre-commit.com
273273[ poetry ] : https://python-poetry.org
274+ [ python-dateutil ] : https://github.com/dateutil/dateutil
274275[ rabbitmq ] : https://www.rabbitmq.com
0 commit comments