Closed cortadocodes closed 4 months ago
The only downside I can think of for this is that we lose the ability to know if:
I think it's worth it though as it will:
I think carrying on using the order
attribute is actually tech-debt now that we've moved towards an event driven architecture.
I think on the basis that we don't ever, in practicality, actually do anything if we're missing messages, this is a small price to pay for a great simplification in an area where actually we've accumulated a lot of unnecessary complexity. So I'm all for this.
I've realised that, for synchronous questions, "ordering by datetime" would in fact mean just handling the events in the order that pub/sub sends them in. This is because datetimes are continuous whereas the integer order
attribute was discrete.
We'll try this without a pub/sub ordering key and add one if it becomes an issue. Asynchronous questions can still be ordered by datetime.
Bug report
What is the current behavior?
When getting events, both the question and the first response event from the child have order zero, so we get a duplicate event warning and can only see one of those events.
What is the expected behavior?
We should be able to get the question and the first response with no warning.
Proposed Solution
Order events by datetime in the event handlers instead of the
order
attribute.