Skip to content
Snippets Groups Projects

NXCALS-1464 Fixes sonarqube issues on monitoring-producer

3 files
+ 14
64
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -68,16 +68,15 @@ public class DataPublisherImpl implements DataPublisher {
long timestamp = (timeInMillis + i * 1000) * 1_000_000;
ImmutableData data = valueCreator
.createData(recordConfig.getRecordKeys(), recordConfig.getTimestampKeyName(), timestamp);
//log.debug("Publishing value {}", data);
Publisher<ImmutableData> publisher = publishers
.computeIfAbsent(recordConfig.getSystem(), this.publisherCreator);
CompletableFuture<Result> future = publisher.publishAsync(data);
future.whenComplete((v, e) -> {
if (e != null) {
future.whenComplete((result, throwable) -> {
if (throwable != null) {
log.error("Cannot send data with keys={} for timestamp={}", recordConfig.getRecordKeys(),
timestamp, e);
timestamp, throwable);
}
});
//This sleep is needed to avoid messages order problem when schema changes
Loading