Answer dead-letters on the lent serving connection, and keep one clip helper
Two handles to the same serving connection, and two copies of one helper, would drift (review of hq issues 327 and 330).
This commit is contained in:
@@ -660,8 +660,6 @@ func watchTheMesh(ctx context.Context, open *stores, server *link.Server, bus li
|
||||
return nil
|
||||
}
|
||||
conditionsFrom = keeper
|
||||
// What a consumer gave up on is read and acted on by the verb in this process (novox/hq issue 330).
|
||||
deadLettersOn.Store(&busHandles{conn: server.JetStream().Conn(), js: server.JetStream().Context()})
|
||||
logf := func(format string, args ...any) { fmt.Printf(format+"\n", args...) }
|
||||
stopHearing, err := server.HearAdvisories(logf)
|
||||
if err != nil {
|
||||
@@ -688,8 +686,6 @@ func watchTheMesh(ctx context.Context, open *stores, server *link.Server, bus li
|
||||
return func() {
|
||||
stop()
|
||||
stopHearing()
|
||||
// No longer serving: the verb answers that it does not read DEAD_LETTERS here (novox/hq issue 330).
|
||||
deadLettersOn.Store(nil)
|
||||
flushing, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
defer cancel()
|
||||
keeper.Close(flushing)
|
||||
|
||||
Reference in New Issue
Block a user