When using JNAMessageQueue#take as part of a server addin, I found that it kept the CPU core it was running on at about 50% usage when idle. To test the alternate case, I made a get(long, TimeUnit) alternative method that uses MQGet instead of MQScan, and that sits at essentially 0% usage at all times. MQScan may be superior for some cases, but it'd make sense to replace methods like #take with MQGet-based implementations.
Hmm, not just CPU - looks like it rapidly consumes memory, too, going from an expected baseline of about 200MB to 750MB in less than a minute, and continuing from there.
When using JNAMessageQueue#take as part of a server addin, I found that it kept the CPU core it was running on at about 50% usage when idle. To test the alternate case, I made a
get(long, TimeUnit)
alternative method that usesMQGet
instead ofMQScan
, and that sits at essentially 0% usage at all times.MQScan
may be superior for some cases, but it'd make sense to replace methods like #take withMQGet
-based implementations.