Count a dead letter by when it was kept, so one kept late still counts (issue 440)
The give-up time is not newer for every letter kept: a notice that could not be kept is offered again a minute later, so a later give-up can be kept first and the one after it read as not fresh. The stored time rises with the stream's sequence. A consumer whose letters vanish between the two reads is left out of the look instead of counted as a look, and the skip of a token-less max-deliveries advisory now has a test of its own.
This commit is contained in:
@@ -154,7 +154,9 @@ type Condition struct {
|
||||
Gaps []Gap `json:"gaps,omitempty"`
|
||||
// Observations is how many times it was observed since raised: a look that sees it, for a source
|
||||
// that looks at the present; for one that reads a record of what happened (Observation.Happened),
|
||||
// how many times it happened, and LastObserved when it last did (novox/hq issue 402).
|
||||
// how many times it happened, and LastObserved when it last did (novox/hq issue 402). That count is a
|
||||
// running total since raised, never lowered: a consumer's dead letters count each message given up on
|
||||
// while the condition is open, not the number held now (novox/hq issue 440).
|
||||
Observations int `json:"observations"`
|
||||
// Count is how many times it has been raised, a reopening within ReopenWithin counted.
|
||||
Count int `json:"count"`
|
||||
|
||||
Reference in New Issue
Block a user