GH-1051 - 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:
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user