diff --git a/eventmesh-examples/src/main/java/org/apache/eventmesh/grpc/sub/app/service/SubService.java b/eventmesh-examples/src/main/java/org/apache/eventmesh/grpc/sub/app/service/SubService.java index 8d3fe0d075..f48dad1d2d 100644 --- a/eventmesh-examples/src/main/java/org/apache/eventmesh/grpc/sub/app/service/SubService.java +++ b/eventmesh-examples/src/main/java/org/apache/eventmesh/grpc/sub/app/service/SubService.java @@ -90,7 +90,7 @@ public void afterPropertiesSet() throws Exception { e.printStackTrace(); } logger.info("stopThread start...."); - System.exit(0); + throw new RuntimeException(); }); stopThread.start(); } diff --git a/eventmesh-examples/src/main/java/org/apache/eventmesh/http/demo/sub/service/SubService.java b/eventmesh-examples/src/main/java/org/apache/eventmesh/http/demo/sub/service/SubService.java index b825bc979c..d2aab6f738 100644 --- a/eventmesh-examples/src/main/java/org/apache/eventmesh/http/demo/sub/service/SubService.java +++ b/eventmesh-examples/src/main/java/org/apache/eventmesh/http/demo/sub/service/SubService.java @@ -93,7 +93,7 @@ public void afterPropertiesSet() throws Exception { e.printStackTrace(); } logger.info("stopThread start...."); - System.exit(0); + throw new RuntimeException(); }); stopThread.start(); }