GH-1083 - Only unregister resubmitted event publication in case of errors.

Before this commit the code resubmitting incomplete event publications unregistered them independently of whether they succeeded or not. We now only do that for failed submissions as an error here indicates a failure to *submit* the publication. As the execution is likely performed asynchronously, a successful hand-off does not implicate the publication being completely processed.
This commit is contained in:
Oliver Drotbohm
2025-02-23 13:11:04 +01:00
parent f61e7d91a0
commit 8fa9bc516c

View File

@@ -218,12 +218,11 @@ public class DefaultEventPublicationRegistry
} catch (Exception o_O) {
inProgress.unregister(it);
if (LOGGER.isInfoEnabled()) {
LOGGER.info("Error republishing event publication %s.".formatted(it), o_O);
}
} finally {
inProgress.unregister(it);
}
});
}