Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ public void put(List<ConnectRecord> sinkRecords) {
try {
queue.put(connectRecord);
} catch (InterruptedException e) {
throw new RuntimeException(e);
Thread currentThread = Thread.currentThread();
log.warn("[OpenFunctionSinkConnector] Interrupting thread {} due to exception {}",
currentThread.getName(), e.getMessage());
currentThread.interrupt();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ public List<ConnectRecord> poll() {
}
connectRecords.add(connectRecord);
} catch (InterruptedException e) {
// nothing to do
break;
Thread currentThread = Thread.currentThread();
log.warn("[OpenFunctionSourceConnector] Interrupting thread {} due to exception {}",
currentThread.getName(), e.getMessage());
currentThread.interrupt();
}
}
return connectRecords;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ public void put(List<ConnectRecord> sinkRecords) {
Message message = convertRecordToMessage(connectRecord);
try {
SendResult sendResult = producer.send(message);
} catch (InterruptedException e) {
Thread currentThread = Thread.currentThread();
log.warn("[RocketMQSinkConnector] Interrupting thread {} due to exception {}",
currentThread.getName(), e.getMessage());
currentThread.interrupt();
} catch (Exception e) {
log.error("[RocketMQSinkConnector] sendResult has error : ", e);
}
Expand Down