ResourceQueueUtils# getResourceCount() function is responsible for triggering an xpath query to get the resource queue items. This query tries to find all the nt:unstructured nodes under a resource queue's path. This query is currently not backed by any index definition. This leads to a warning like below being logged when a request is made to list the items of resource queue -
Switching to traversal here would be as efficient as writing an index for this query.
Further, since a resource queue can also be an active queue and the items will come and go, the indexer will have to do extra work of indexing the transient items.