davsclaus opened a new pull request, #27904: URL: https://github.com/apache/camel/pull/27904
## Backport of #27762 and #27764 Straight cherry-picks, in order, of the two squash commits from `main` onto `camel-4.22.x`. Both applied without conflicts: - 05b3e67bb9f2 — CAMEL-25582 (#27762): a `consumeAsClient` consumer reconnects with one attempt at a time, cancels its reconnect timer when it stops, and closes a WebSocket that connects after the timeout. - 1d59394c3ecd — CAMEL-25601 (#27764): a client consumer started while the endpoint's WebSocket is already open registers its handlers. This replaces #27830, which ported #27764 with only part of #27762 underneath it. That mix left out the reconnect timer handling of #27762 (`cancelReconnect()` in `doStop`, the `isStarted()` check in `reconnect()`) and the guards in the connect callback. Without them, a stopped consumer's reconnect timer can take over the WebSocket of the restarted route, as described in the review of #27830. Taking both commits as they were reviewed and merged on `main` avoids that. The tests come with the commits (`VertxWebsocketConsumerAsClientSlowReconnectTest`, `VertxWebsocketClientConsumerHandlersTest`). They use `camel-test-junit6`, which this branch and module already use. Not built locally; CI will run the camel-vertx-websocket tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) _Claude Code on behalf of @davsclaus_ -- 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]
