fix: harden single-machine load handling
This commit is contained in:
+5
-1
@@ -251,7 +251,11 @@ func (h *Hub) run() {
|
||||
immetrics.ObserveInternalQueueEnqueue("topic_client", len(dst.clientMsg), cap(dst.clientMsg), true)
|
||||
default:
|
||||
immetrics.ObserveInternalQueueEnqueue("topic_client", len(dst.clientMsg), cap(dst.clientMsg), false)
|
||||
logs.Err.Println("hub: topic's broadcast queue is full", dst.name)
|
||||
if msg.sess != nil {
|
||||
msg.sess.queueOut(ErrServiceUnavailableReply(msg, types.TimeNow()))
|
||||
}
|
||||
logs.Err.Printf("hub: topic's broadcast queue is full topic=%s tenant=%d len=%d cap=%d",
|
||||
dst.name, dst.tenantID, len(dst.clientMsg), cap(dst.clientMsg))
|
||||
}
|
||||
} else {
|
||||
logs.Warn.Println("hub: invalid topic category for broadcast", dst.name)
|
||||
|
||||
Reference in New Issue
Block a user