davsclaus commented on code in PR #26541:
URL: https://github.com/apache/camel/pull/26541#discussion_r4061049705
##########
components/camel-vertx/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketProducer.java:
##########
@@ -60,13 +60,18 @@ public boolean process(Exchange exchange, AsyncCallback
callback) {
}
Map<String, WebSocketBase> connectedPeers =
getConnectedPeers(exchange);
- VertxWebsocketResultHandler vertxWebsocketResultHandler
- = new VertxWebsocketResultHandler(exchange, callback,
connectedPeers.keySet());
if (connectedPeers.isEmpty()) {
+ // nothing was sent, so the exchange is done here rather than
from a write handler
+ LOG.warn("No WebSocket peer to send to for endpoint {}, the
message is not delivered",
Review Comment:
Non-blocking: this WARN fires on every message in the `sendToAll` case. A
route that broadcasts on a timer (a status push every second, say) with no
browser connected yet would log a WARN per tick, and "nobody is listening right
now" is a normal condition for a broadcast rather than an error. I would keep
WARN for the explicit `connectionKey`-matched-nothing case (that one is a real
misconfiguration signal, and it already warns in `getConnectedPeers`) and use
DEBUG here for the broadcast-to-nobody case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]