As the source code indicates, nomad only maintains the most recent 10 events for every task.
// defaultMaxEvents is the default max capacity for task events on the // task state. Overrideable for testing. defaultMaxEvents = 10
So, is there any way to get all the events of a task?
If i use the blocking query API
/v1/allocation/<allocationID>?index=<N>, i can get the task event set in most case.
However, is there a possibility that task events are produced too fast, and I call this api as soon as receving task events from last call, but more than 10 events have been produced, so some events are lost, that is, I cannot get them forever.