Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-20684

camel-microprofile-fault-tolerance: ThreadTimer should be a singleton

    XMLWordPrintableJSON

Details

    • Unknown

    Description

      Something I missed when upgrading SmallRye Fault Tolerance to 6.3.0 is that the use of ThreadTimer requires it to be a singleton. You can't create multiple instances with a custom executor on each init of FaultToleranceProcessor.

      https://github.com/smallrye/smallrye-fault-tolerance/blob/3d92e94269619115062a55f145b6b07eda18452f/implementation/core/src/main/java/io/smallrye/faulttolerance/core/timer/ThreadTimer.java#L67

      For Quarkus, there's already a singleton scoped CDI bean containing the ThreadTimer, so we could wire that into the Camel registry and look it up later.

      Not sure how best to manage it for non-quarkus apps. You'd need to manage the lifecycle of the ThreadTimer & executor on Camel startup / shutdown.

      Attachments

        Issue Links

          Activity

            People

              jamesnetherton James Netherton
              jamesnetherton James Netherton
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: