I'm using AHC-WS component in Apache Camel to connect to a websocket server using WSS. When the server closes the connection, I got the IOException exception and my errorHandler start redelivery but it seems that the redelivery fails (it only restarted once although I specifies 10 for maximum redeliveries) and the only way to resolve this problem is to restart my camel route manually in order to connect to the websocket server again.
errorHandler(deadLetterChannel("seda:dead")
.maximumRedeliveries(10).useExponentialBackOff()
.log("Route exception"));
fromF("ahc-wss://some-url&bridgeErrorHandler=true&sendMessageOnError=true")
.filter(exchange -> exchange.getIn().getBody() != null)
.process(exchange -> {
String msg = (String) exchange.getIn().getBody();
log.info("Message size: " + msg.length());
})
.log("test done");