In some cases, pleople might need the time of the event in their application. In most cases, (new Date()).getTime() will do the job, but when you load a stored messages, this is not usable anymore.
This change sends event time on onmessage callback as 6th parameter (after isLastMessageFromBatch).
The event time is sent in GMT timezone.
The scenario for which i had to do this change:
I use pushstream for a realtime dashboard, and i aggregate events per second, and per minute. because I load data since 4 hours ago, i needed the time of the event so i can aggregate history properly.
In some cases, pleople might need the time of the event in their application. In most cases,
(new Date()).getTime()
will do the job, but when you load a stored messages, this is not usable anymore. This change sends event time on onmessage callback as 6th parameter (afterisLastMessageFromBatch
).The event time is sent in GMT timezone.
The scenario for which i had to do this change: I use pushstream for a realtime dashboard, and i aggregate events per second, and per minute. because I load data since 4 hours ago, i needed the time of the event so i can aggregate history properly.