@Override
    protected int poll() throws Exception {
        // must reset for each poll
        shutdownRunningTask = null;
        pendingExchanges = 0;

        List<software.amazon.awssdk.services.sqs.model.Message> messages = pollingTask.call();
        // okay we have some response from aws so lets mark the consumer as ready
        forceConsumerAsReady();

        Queue<Exchange> exchanges = createExchanges(messages);
        return processBatch(CastUtils.cast(exchanges));
    }
@Test
    void shouldCreateMissingQueueWith30SecondsBackoffTimeOnRecentlyDeletedQueue() throws Exception {
        // given
        var createQueueRequestCount = new AtomicInteger();
        configuration.setAutoCreateQueue(true);
        sqsClientMock.setReceiveRequestHandler(request -> {
            throw QueueDoesNotExistException.builder().build();
        });
        sqsClientMock.setCreateQueueHandler(request -> {
            if (createQueueRequestCount.getAndIncrement() == 0) {
                throw QueueDeletedRecentlyException.builder().build();
            }
        });
        sqsClientMock.setQueueUrl(null);
        var elapsedTimeMillis = 450340L;
        doReturn(elapsedTimeMillis).when(clock).elapsed();

        try (var tested = createConsumer(1)) {
            // when
            var polledMessagesCount1 = tested.poll();

            // then queue creation should be scheduled
            assertThat(polledMessagesCount1).isZero();
            assertThat(createQueueRequestCount).hasValue(1);
            assertThat(sqsClientMock.getReceiveRequests()).containsExactly(expectedReceiveRequest(1));

            // when 29.999 seconds passed on next polling
            doReturn(elapsedTimeMillis + 29_999).when(clock).elapsed();
            var polledMessagesCount2 = tested.poll();

            // then queue creation should be ignored
            assertThat(polledMessagesCount2).isZero();
            assertThat(createQueueRequestCount).hasValue(1);
            assertThat(sqsClientMock.getReceiveRequests()).containsExactly(expectedReceiveRequest(1));

            // when 30 seconds passed on next polling
            doReturn(elapsedTimeMillis + 30_000).when(clock).elapsed();
            var polledMessagesCount3 = tested.poll();

            // then queue creation should be invoked
            assertThat(polledMessagesCount3).isZero();
            assertThat(createQueueRequestCount).hasValue(2);
            assertThat(sqsClientMock.getReceiveRequests()).containsExactly(expectedReceiveRequest(1));
        }
    }