In the RequeueAndRemove::RequeueOne() method, the messages are iterated through to find the one to requeue with a matching messageId. However, it uses the QueueClient::ReceiveBatch() method which may return fewer messages than the number requested, consequently it can happen that the message to requeue is not found in the returned list and so nothing happens.
In the RequeueAndRemove::RequeueOne() method, the messages are iterated through to find the one to requeue with a matching messageId. However, it uses the QueueClient::ReceiveBatch() method which may return fewer messages than the number requested, consequently it can happen that the message to requeue is not found in the returned list and so nothing happens.