I have a named task queue. Is there a way to get the # of tasks it currently contains, from the java API?
I know I can check the console page for it, but I'd like to get the count via code so I can report back to the user how many tasks are in there so they know how long they'll have to wait roughly before their task is going to get serviced.
Thanks
Various stats about a queue are available in the Class QueueStatistics
Easy to miss note important in some cases (probably not in yours, as you just want to provide an ETA, which doesn't have to be 100% precise) (emphasis mine):
The method that seems to be what you're looking after is getNumTasks: