Queue Count
You can also use queue.count() to obtain the number of messages in the current component's queue. This can be useful for many applications.
One of the ways we use it is with our Build system.
If we have several Git commits queued up, then we skip the first few in the queue because builds take a few minutes and it doesn’t make sense to build lots of small commits which are not that important.
Those backed up commits were creating a bottleneck in our build process which we able to eliminate with this.
Â