diff --git a/src/main/java/io/cryostat/rules/RuleService.java b/src/main/java/io/cryostat/rules/RuleService.java index 58df86a9f..7b2014705 100644 --- a/src/main/java/io/cryostat/rules/RuleService.java +++ b/src/main/java/io/cryostat/rules/RuleService.java @@ -92,7 +92,7 @@ void onStop(@Observes ShutdownEvent evt) throws SchedulerException { quartz.shutdown(); } - @ConsumeEvent(value = Target.TARGET_JVM_DISCOVERY, blocking = true) + @ConsumeEvent(value = Target.TARGET_JVM_DISCOVERY, blocking = true, ordered = true) void onMessage(TargetDiscovery event) { switch (event.kind()) { case MODIFIED: @@ -123,7 +123,7 @@ void onMessage(TargetDiscovery event) { } } - @ConsumeEvent(value = Rule.RULE_ADDRESS, blocking = true) + @ConsumeEvent(value = Rule.RULE_ADDRESS, blocking = true, ordered = true) @Transactional public void handleRuleModification(RuleEvent event) { Rule rule = event.rule(); @@ -148,7 +148,7 @@ public void handleRuleModification(RuleEvent event) { } } - @ConsumeEvent(value = Rule.RULE_ADDRESS + "?clean", blocking = true) + @ConsumeEvent(value = Rule.RULE_ADDRESS + "?clean", blocking = true, ordered = true) @Transactional public void handleRuleRecordingCleanup(Rule rule) { cancelTasksForRule(rule);