The controller takes one announcement at a time
A merge's handler builds for minutes and keeps its own delivery alive; the announcements handed over behind it timed out on the client and came back, and a merge that came back rebuilt what it had just built, five times over (novox/hq issue 175). MaxAckPending 1 on the events consumer: the server holds the rest.
This commit is contained in:
@@ -260,3 +260,14 @@ func TestNoTwoConsumersDeliverOntoTheSameSubject(t *testing.T) {
|
||||
seen[subject] = c.Name + " on " + c.Stream
|
||||
}
|
||||
}
|
||||
|
||||
// The controller's events consumer is handed one announcement at a time (novox/hq issue 175): a
|
||||
// merge's handler builds for minutes, and what is queued behind it must wait on the server rather
|
||||
// than time out on the client and be acted on twice.
|
||||
func TestTheControllerTakesOneAnnouncementAtATime(t *testing.T) {
|
||||
for _, c := range MeshConsumers() {
|
||||
if c.Stream == "EVENTS" && c.Name == ControllerName && c.MaxAckPending != 1 {
|
||||
t.Fatalf("the events consumer may have %d outstanding; one announcement at a time", c.MaxAckPending)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user