Skip to content

Commit 924fea6

Browse files
Happy-shiZhiwei Shi
andauthored
[Bug] Fix failed to write data to t_message (apache#4156)
Co-authored-by: Zhiwei Shi <[email protected]>
1 parent 98aa780 commit 924fea6

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/NoticeTypeEnum.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
package org.apache.streampark.console.core.enums;
1919

20+
import com.baomidou.mybatisplus.annotation.EnumValue;
21+
2022
import java.util.Arrays;
2123

2224
/** notification type */
@@ -27,6 +29,7 @@ public enum NoticeTypeEnum {
2729
/** message */
2830
MESSAGE(2);
2931

32+
@EnumValue
3033
private final int value;
3134

3235
public int get() {

streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/MessageServiceImpl.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,12 @@ public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message>
4141

4242
@Override
4343
public void push(Message message) {
44-
save(message);
45-
WebSocketEndpoint.pushNotice(message);
44+
try {
45+
save(message);
46+
WebSocketEndpoint.pushNotice(message);
47+
} catch (Exception e) {
48+
log.error("Error pushing notice: {}", e.getMessage(), e);
49+
}
4650
}
4751

4852
@Override

0 commit comments

Comments
 (0)