diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/JobEventLinkedQueueListener.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/JobEventLinkedQueueListener.java index a82582d36f..96da808214 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/JobEventLinkedQueueListener.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/JobEventLinkedQueueListener.java @@ -85,7 +85,9 @@ private void checkIfIsCompleted(final UUID batchId, final LimitedJobEventQueue q log.info("BatchId: {} reached {} state.", batchId, batchProcessingState); saveUpdatedBatch(batch, progressList, batchProcessingState); queueMap.remove(batchId); - publishFinishProcessingEvent(batch, batchProcessingState); + if (isCompleted(batchProcessingState)) { + publishFinishProcessingEvent(batch, batchProcessingState); + } }); } }