title: Azure Service Bus queue message handling
body: <p>So I have an azure function acting as a queue trigger that calls an internally hosted API. </p>
  
  <p>There doesn't seem to be a definitive answer online on how to handle a message that could not be processed due to issues other than being poisonous.  </p>
  
  <p>An example:</p>
  
  <p>My message is received and the function attempts to call the API. The message payload is correct and could be handled however the API/service is down for whatever reason (this time will likely be upwards of 10 minutes). Currently what happens is the message delivery count is reaching its max(10) and then getting pushed to the dead letter queue, which in turn happens for each message after.</p>
  
  <p>I need a way to either not increment the delivery count or reset it upon reaching max. Alternatively I could abandon the peek lock on the message without increment the delivery count as I want to stop processing any message on the queue until the API/service is back up and running. 
   This way I would ensure that all messages that can be processed will be and will not fall on the dead letter because of connection issues between services.</p>
  
  <p>Any ideas on how to achieve this?</p>