Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Aias00 authored Nov 4, 2024
2 parents dda33ed + 8aec251 commit 244f23a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ public void consume0(@NonNull final List<ShenyuRequestLog> logs) {
.map(apiConfig -> StringUtils.defaultIfBlank(apiConfig.getTopic(), topic)
).orElse(topic);
try {
producer.send(toProducerRecord(logTopic, log));
producer.send(toProducerRecord(logTopic, log), (metadata, exception) -> {
if (Objects.nonNull(exception)) {
LOG.error("kafka push logs error", exception);
}
});
} catch (Exception e) {
LOG.error("kafka push logs error", e);
}
Expand Down

0 comments on commit 244f23a

Please sign in to comment.