diff --git a/inlong-sdk/dirty-data-sdk/src/main/java/org/apache/inlong/sdk/dirtydata/InlongSdkDirtySender.java b/inlong-sdk/dirty-data-sdk/src/main/java/org/apache/inlong/sdk/dirtydata/InlongSdkDirtySender.java index 14fd9e697e..4565a2947d 100644 --- a/inlong-sdk/dirty-data-sdk/src/main/java/org/apache/inlong/sdk/dirtydata/InlongSdkDirtySender.java +++ b/inlong-sdk/dirty-data-sdk/src/main/java/org/apache/inlong/sdk/dirtydata/InlongSdkDirtySender.java @@ -77,10 +77,12 @@ public void sendDirtyMessageSync(DirtyMessageWrapper messageWrapper) throws Inte dirtyDataQueue.put(messageWrapper); } - public void sendDirtyMessageAsync(DirtyMessageWrapper messageWrapper) throws InterruptedException { - if(!dirtyDataQueue.offer(messageWrapper)) { - log.warn("the dirty data queue is full, you can increase the size of queue by configure maxCallbackSize"); + public boolean sendDirtyMessageAsync(DirtyMessageWrapper messageWrapper) { + boolean result = dirtyDataQueue.offer(messageWrapper); + if (!result) { + log.warn("send dirty message async queue is full, you can increase maxCallbackSize"); } + return result; } private void doSendDirtyMessage() {