Fixing the bug of rabbitmq consumer threads being killed for unhandled exceptions
@@ -705,7 +705,9 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface {
String.format("Experiment launch failed due to Thrift conversion error, experimentId: %s, gatewayId: %s",
expEvent.getExperimentId(), expEvent.getGatewayId()) : "Experiment launch failed due to Thrift conversion error";
log.error(logMessage, e);
- throw new RuntimeException("Experiment launch error", e);
+ } catch (Exception e) {
+ log.error("An unknown issue while launching experiment " + Optional.ofNullable(expEvent.getExperimentId()).orElse("missing experiment") +
+ " on gateway " + Optional.ofNullable(expEvent.getGatewayId()).orElse("missing gateway"), e);
} finally {
experimentSubscriber.sendAck(messageContext.getDeliveryTag());
MDC.clear();
