Replace hardcoded testing for availability to runtime testing for queues