How to know if queue items are present using studio

Hi @ydash999 and @Divyashreem,

Avoid Get Transaction Item if you are only checking for existence of queue items
Do not use the Get Transaction Item to check if there are queue items if you are not going to process them at the same time. Get Transaction Item will lock the item to in-progress in the queue. So it tells you there are items, but it can also remove one item from processing and edit its state.

Get Queue Items is a safer activity for such checks
If you want to check the queue has items in it the safest activity is Get Queue Items, where you can filter the items as well. Choose the appropriate QueueItemStates to filter.

You can use the Pagination option to top=1, i.e., at the minimum there exists one item in the queue. If the count returned of QueueItems variable is > 0 (QueueItems.Count > 0) then there is an item in the queue.

4 Likes