-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sequence to Events emitted by Runtime Bundle #2142
Comments
We need to clearly define the usage and presence of this new field. @salaboy is the scope of the field
We get this:
The intention behind this issue is to have a field in each of the events that establishes a sequence number based on chronological order, but without relying in the timestamp, right? |
@salaboy A different approach would be populating that field once is persisted in the database on the consumer end, without the need for establishing in the runtime bundle. |
@miguelruizdev we need to generate from the producer side.. in the same way that we do with the timestamp. |
@salaboy we set the timestamp at the moment of instantiation in every event: The value of sequenceNumber will depend on the existence of other events, so that place needs to have that information. Also, the lifespan of this sequence should be bound to the execution of a process, right? |
Regarding the transaction unique identifier, do we have model for transactions? |
@miguelruizdev after discussing this with @erdemedeiros and @ryandawsonuk I think that we agreed that we should:
I would start with that basic approach first.. then we can see if we need to change Query as well. |
Then, I guess that the place where to start in RB is the MessageProducerCommandContextCloseListener. Regarding the changes in the api layer, I think that the addition of a method in CloudRuntimeEvent and its implementation will suffice. |
@miguelruizdev you need to start in query.. both of my points were in query service. No need to touch RB |
@salaboy @erdemedeiros @ryandawsonuk regarding the value of the Header the message carries, will it be enough to have a UUID or do we need a specific value already present? Will it be a value we extract from the execution itself? |
Regarding the id of the batch of events processed by audit, the logical place for those changes to take place seems to be AuditConsumerChannelHandlerImpl. But then, one question arises: Audit is a dumb consumer since we don't process the data we get from the outside world, we just store it. Is this right from a design point of view? |
@miguelruizdev it is totally right as soon as we decorate the data that we are getting. So it is ok to do it there. |
merged |
Each event sent by the Runtime Bundle should include a sequence number which helps to identify the order of the event inside the transaction. Each event is providing a timestamp, but this is not enough to understand which event happened first from the consumer side (ie audit, query).
The text was updated successfully, but these errors were encountered: