code: func (b *Broker) StartConsuming(consumerTag string, concurrency int, taskProcessor iface.TaskProcessor) (bool, error) {
  	b.Broker.StartConsuming(consumerTag, concurrency, taskProcessor)
  	qURL := b.getQueueURL(taskProcessor)
  	//save it so that it can be used later when attempting to delete task
  	b.queueUrl = qURL
  
  	deliveries := make(chan *awssqs.ReceiveMessageOutput)
  
  	b.stopReceivingChan = make(chan int)
  	b.receivingWG.Add(1)
  
  	go func() {
  		defer b.receivingWG.Done()
  
  		log.INFO.Printf("[*] Waiting for messages on queue: %s. To exit press CTRL+C\n", *qURL)
  
  		for {
  			select {
  			// A way to stop this goroutine from b.StopConsuming
  			case <-b.stopReceivingChan:
  				return
  			default:
  				output, err := b.receiveMessage(qURL)
  				if err != nil {
  					log.ERROR.Printf("Queue consume error: %s", err)
  					continue
  				}
  				if len(output.Messages) == 0 {
  					continue
  				}
  
  				deliveries <- output
  			}
  
  			whetherContinue, err := b.continueReceivingMessages(qURL, deliveries)
  			if err != nil {
  				log.ERROR.Printf("Error when receiving messages. Error: %v", err)
  			}
  			if whetherContinue == false {
  				return
  			}
  		}
  	}()
  
  	if err := b.consume(deliveries, concurrency, taskProcessor); err != nil {
  		return b.GetRetry(), err
  	}
  
  	return b.GetRetry(), nil
  }
docs: // StartConsuming enters a loop and waits for incoming messages