activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franz1981 <>
Subject [GitHub] activemq-artemis issue #1576: ARTEMIS-1447 JDBC NodeManager to support JDBC ...
Date Tue, 10 Oct 2017 14:30:13 GMT
Github user franz1981 commented on the issue:
    @clebertsuconic You're right, I need to take a better example to explain what I mean.
    Quoting from the `CriticalAnaylizerImpl`:
          // we are not using any Thread Pool or any Scheduled Executors from the ArtemisServer
          // as that would defeat the purpose,
          // as in any deadlocks the schedulers may be starving for something not responding
fast enough
          thread = new Thread("Artemis Critical Analyzer")
    The reason is similar: if for any reason (eg deadlocks/long JVM pauses/a single long running
task) the live/backup locks wouldn't be renewed with the correct timing (ie not a matter to
be fast but with a correct timing), the mechanics of the node manager will be compromised.
It sounds cathastrofic but is the same limitation of the original JDBC lock of ActiveMQ 6:
    Hence I need 2 executors that cannot be shared with none in order to minimize the chance
of being slowed down.
    To summarize:
    > if you need your own executor, still use the component which encapsulates that..

    I need 2 of them (live + backup), not shared and to use `scheduleWithFixedRate` instead
of `scheduleWithFixedDelay` used in the `ActiveMQScheduledComponent`: probably is not the
right choice.
    > if you can reuse one from the pool.. (It seems you can).. you can just pass in the
    I can pass them in the argument, but given that I need them to be unshared and I can't
be sure of it if they will be instantiated elsewhere.
    In order to use your advice what I can do (maybe similar) is to pass a common thread pool
and run the scheduled executors on top of it.
    And Re the package there is a good place (and module) in your opinion where I could move
the classes?


View raw message