code: def on_receipt(self, headers, body):
          
          if 'receipt-id' in headers and headers['receipt-id'] == self.receipt:
              with self.receipt_condition:
                  self.received = True
                  self.receipt_condition.notify()
docs: If the receipt id can be found in the headers, then notify the waiting thread.
  
          :param dict headers: headers in the message
          :param body: the message content