EventTimer: periodic timer does not send expected number of events when late
Description
When a periodic event timer expiration is late, it should send the expected number of events missed until current date to catch up missed expiration. It is the case for event timer for publishing cycle which may lead to missed publishing cycles in subscription to increment the KeepAlive and LifeTime counters.
Analysis
The periodic event timer evaluation compensates the next timer expiration when being late which might be in the past regarding current time. But since it will be evaluated only on next evaluation cycle (depending event timer resolution configured), it will increase the lateness and the number of events therefore only depends on the event timer resolution instead of the required event period.
Therefore in case of event period < event timer resolution, this behavior is the one observed and is not acceptable.
Fixes
- When a periodic event timer expiration is late, it should send the expected number of events missed until current date and then schedule the next expiration (> current time).
- The event timer manager shall log warning when creating periodic timer with a period less than or equal to the event timer resolution.
- The subscription minimum publishing cycle should be checked to be greater than the event timer resolution configured