code: func (b *Broker) consume(deliveries <-chan *awssqs.ReceiveMessageOutput, concurrency int, taskProcessor iface.TaskProcessor) error {
  	pool := make(chan struct{}, concurrency)
  
  	// initialize worker pool with maxWorkers workers
  	go func() {
  		b.initializePool(pool, concurrency)
  	}()
  
  	errorsChan := make(chan error)
  
  	for {
  		whetherContinue, err := b.consumeDeliveries(deliveries, concurrency, taskProcessor, pool, errorsChan)
  		if err != nil {
  			return err
  		}
  		if whetherContinue == false {
  			return nil
  		}
  	}
  }
docs: // consume is a method which keeps consuming deliveries from a channel, until there is an error or a stop signal