diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/NoticeTypeEnum.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/NoticeTypeEnum.java index 952051e65c..d68e60aef4 100644 --- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/NoticeTypeEnum.java +++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/NoticeTypeEnum.java @@ -17,6 +17,8 @@ package org.apache.streampark.console.core.enums; +import com.baomidou.mybatisplus.annotation.EnumValue; + import java.util.Arrays; /** notification type */ @@ -27,6 +29,7 @@ public enum NoticeTypeEnum { /** message */ MESSAGE(2); + @EnumValue private final int value; public int get() { diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/MessageServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/MessageServiceImpl.java index e1aac54b1f..563de2b441 100644 --- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/MessageServiceImpl.java +++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/MessageServiceImpl.java @@ -41,8 +41,12 @@ public class MessageServiceImpl extends ServiceImpl @Override public void push(Message message) { - save(message); - WebSocketEndpoint.pushNotice(message); + try { + save(message); + WebSocketEndpoint.pushNotice(message); + } catch (Exception e) { + log.error("Error pushing notice: {}", e.getMessage(), e); + } } @Override