-
fix(reaper): use explicit @Inject constructor so reaper job instantiates under Quartz (#7206)
发布于
2026-06-22 14:39:22 +00:00 StreamConsumerReaperJob is not bound by JobGuiceyInstaller (no @Every/@On), so
Quartz's GuiceJobFactory JIT-resolves it via injector.getInstance and falls back to a
no-arg reflective constructor if any dependency fails to resolve. The @Config qualifier
copied onto the Lombok @RequiredArgsConstructor parameter is not honored on that path in
the packaged app, so the job failed to instantiate at trigger time
(NoSuchMethodException: ()) and never ran. Declaring the constructor explicitly
with @Config on the parameter makes the qualified injection resolve.Verified in a real Docker image (opik.sh --build): the reaper now runs and reaped 30
orphaned consumers across 11 streams. The unit test missed this because its injector
resolves the qualifier that the packaged app's JIT path does not.下载附件