188.8.131.52. Event message SSE stream The service shall use the id field in the SSE stream to uniquely indicate an event payload. The value of the id field shall be the same as the Id property in the event payload. The value of the Id property in the event payload should be the same as the EventId property of the last event record in the Events array. The value of the EventId property for an event record should be a positive integer value and should be generated in a sequential manner. Because clients may not subscribe for every event, the SSE stream may contain gaps in the sequence of EventId values. A service should accept the Last-Event-ID header from the client to allow a client to restart the event stream in case the connection is interrupted.
Is SSE EventId needs same as EventId in Redfish LogService? Or they can be independent? Ex: If we have have log(EventId is 10) recorded in Redfish LogService, and then we try to connect SSE and generate one more log, For SSE, it is first log, but for LogService, it is eleventh log. In this situation, how do we display SSE Id?
The reality is the "SSE id" is just an opaque identifier for a client to use when requesting a stream to be re-established after a client loses the connection to the service. The value itself doesn't have any real meaning to be applied to it. Because of this, we recently stripped out all ties between "SSE id" and the various Id properties in the events themselves.
If you'd like to continue tying the Ids together, that's okay to do though; it might make things easier for you internally to be able to support re-establishing a stream with Last-Event-ID. If a client's first attempt at opening the stream starts at "id: 100" as opposed to "id: 1", that's also okay since these values are just unique identifiers.