File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,35 @@ RabbitMQ Topic Queue.
180180## Version 2
181181Version 2 uses the ` rstream ` package and relies on a RabbitMQ stream.
182182
183+ Version 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+ and the message's ** timestamp** (also an ` integer ` ), both of which are provided by
186+ the backing RabbitMQ stream as the messages are received by the Event Stream's consumer.
187+ The ** offset** can be used as a unique message identifier.
188+
189+ When received as a protobuf string the values are appended to the end of the original
190+ message using ` | ` as a delimiter. Here is an example, with the message split at the
191+ delimiter for clarity: -
192+
193+ accountserver.MerchantProcessingCharge
194+ |timestamp: "2025-04-30T19:20:37.926+00:00" merchant_kind: "DATA_MANAGER" [...]
195+ |offset: 2
196+ |timestamp: 1746042171620
197+
198+ JSON 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
200+ for clarity: -
201+
202+ {
203+ "ess_offset": 2,
204+ "ess_timestamp": 1746042171620,
205+ "message_type": "accountserver.MerchantProcessingCharge",
206+ "message_body": {
207+ "timestamp": "2025-04-30T19:20:37.926+00:00",
208+ "merchant_kind": "DATA_MANAGER"
209+ }
210+ }
211+
183212---
184213
185214[ black ] : https://black.readthedocs.io/en/stable
You can’t perform that action at this time.
0 commit comments