title: Cloud Pub/Sub missing ack/nack in callback not causing redelivery
body: <p>I'm trying to make sure that Cloud Pub/Sub will redeliver my message if there is no ack/nack sent. It doesn't seem to do this even though I wait for more than 10 minutes, which should be the maximum time for the Acknowledgement Deadline. </p>
  
  <p>I'm using the example here as a starting point: 
  <a href="https://cloud.google.com/pubsub/docs/quickstart-py-mac" rel="nofollow noreferrer">https://cloud.google.com/pubsub/docs/quickstart-py-mac</a></p>
  
  <p>Essentially, I commented the line in the callback function that ack's the message. I used two terminals, one for publishing the message and one for receiving it as a subscriber. Since no ack's are being sent, I expected Cloud Pub/Sub to attempt to redeliver the message to the subscriber sometime within the ack deadline, but it doesn't. </p>
  
  <p>The docs here </p>
  
  <p><a href="https://godoc.org/cloud.google.com/go/pubsub#hdr-Deadlines" rel="nofollow noreferrer">https://godoc.org/cloud.google.com/go/pubsub#hdr-Deadlines</a> </p>
  
  <p>say the the "ACK deadlines are extended periodically by the client... up to 10 minutes", so I waited 10 minutes in case the ack deadline was extended to that maximum but I still didn't receive the redelivered message.</p>
  
  <p>Here is the edited callback method that I used. This was the only change I made to the example code.</p>
  
  <pre><code>def callback(message):
          print('Received message {} of message ID {}'.format(
              message, message.message_id))
          # Acknowledge the message. Unack'ed messages will be redelivered.
          # message.ack()
          print('Acknowledged message of message ID {}\n'.format(
              message.message_id))
  </code></pre>
  
  <p>If I kill the subscriber (sub.py) and restart it, the message is redelivered. Am I doing something wrong? Also, when I send a Nack instead of not sending anything at all, the message is quickly redelivered.</p>
  
  <p>EDIT: </p>
  
  <p>It seems like similar questions have been asked on</p>
  
  <p><a href="https://github.com/googleapis/google-cloud-python/issues/5005" rel="nofollow noreferrer">https://github.com/googleapis/google-cloud-python/issues/5005</a></p>
  
  <p><a href="https://github.com/googleapis/google-cloud-python/issues/5044" rel="nofollow noreferrer">https://github.com/googleapis/google-cloud-python/issues/5044</a></p>
  
  <p>Things I wanted to confirm:</p>
  
  <ol>
  <li><p>The Ack Deadline set in the subscription is not always the value used. It's extended as Pub/Sub deems necessary.</p></li>
  <li><p>The 10 minute max Ack Deadline is not actually the maximum time that can elapse before a message is redelivered </p></li>
  <li><p>This maximum time is determined by the flow_control.max_lease_duration variable (default is 2 hours)</p></li>
  </ol>