Skip to content

Commit

Permalink
more explicit logging for broker2http SSE receivers
Browse files Browse the repository at this point in the history
Signed-off-by: Lance-Drane <[email protected]>
  • Loading branch information
Lance-Drane committed Sep 30, 2024
1 parent 7dbef63 commit 8b7dabd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion broker-2-http/src/routes/subscribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ fn sse_response(
yield Ok(event);
},
Err(e) => {
tracing::error!(error = ?e, "SSE somehow didn't get message from broadcaster");
match e {
tokio::sync::broadcast::error::RecvError::Closed => {
tracing::error!(error = ?e, "Broadcasting pipeline to SSE somehow closed, should not see this message!")
},
tokio::sync::broadcast::error::RecvError::Lagged(lag_count) => {
tracing::error!(error = ?e, "SSE has missed {} messages from broadcaster", lag_count)
},
};
},
}
},
Expand Down

0 comments on commit 8b7dabd

Please sign in to comment.