code: func (b *Broker) consumeOne(delivery *awssqs.ReceiveMessageOutput, taskProcessor iface.TaskProcessor) error {
  	if len(delivery.Messages) == 0 {
  		log.ERROR.Printf("received an empty message, the delivery was %v", delivery)
  		return errors.New("received empty message, the delivery is " + delivery.GoString())
  	}
  
  	sig := new(tasks.Signature)
  	decoder := json.NewDecoder(strings.NewReader(*delivery.Messages[0].Body))
  	decoder.UseNumber()
  	if err := decoder.Decode(sig); err != nil {
  		log.ERROR.Printf("unmarshal error. the delivery is %v", delivery)
  		return err
  	}
  
  	// If the task is not registered return an error
  	// and leave the message in the queue
  	if !b.IsTaskRegistered(sig.Name) {
  		return fmt.Errorf("task %s is not registered", sig.Name)
  	}
  
  	err := taskProcessor.Process(sig)
  	if err != nil {
  		return err
  	}
  	// Delete message after successfully consuming and processing the message
  	if err = b.deleteOne(delivery); err != nil {
  		log.ERROR.Printf("error when deleting the delivery. delivery is %v, Error=%s", delivery, err)
  	}
  	return err
  }
docs: // consumeOne is a method consumes a delivery. If a delivery was consumed successfully, it will be deleted from AWS SQS