See comment: https://github.com/ScalaConsultants/mesmer/pull/514/files#r1028326753
The approach would allow using an async instrument which in that case might be not as heavy as adding code to every enqueue/dequeue invocation (as it is right now). However, getting the numberOfMessages "may be a costly operation" so not sure which approach is better.
This task is to investigate this and change the implementation if needed.