SUPPORT-9212: фикс

This commit is contained in:
adel.kalimullin 2025-06-10 17:13:25 +03:00
parent 0f2588e7cc
commit 226c554eaf
2 changed files with 11 additions and 1 deletions

View file

@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@JsonIgnoreProperties(ignoreUnknown = true)
public class UpsertMessage<T>{
private T data;
private boolean success;
public T getData() {
return data;
@ -17,4 +18,12 @@ public class UpsertMessage<T>{
public void setData(T data) {
this.data = data;
}
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
}

View file

@ -81,7 +81,8 @@ public class IdmDirectoriesService {
UpsertMessage<T> message = objectMapper.readValue(kafkaMessage, messageType);
if (message.getData() != null) {
if (Boolean.TRUE.equals(message.isSuccess())
&& message.getData() != null) {
DataProcessor<T, ?> processor = (DataProcessor<T, ?>) dataProcessors.get(entityClass);
if (processor == null) {
throw new IllegalStateException("No processor found for " + entityClass.getSimpleName());