code: func (b *Broker) StartConsuming(consumerTag string, concurrency int, taskProcessor iface.TaskProcessor) (bool, error) {
  	b.Broker.StartConsuming(consumerTag, concurrency, taskProcessor)
  	deliveries := make(chan *pubsub.Message)
  
  	sub := b.service.Subscription(b.subscriptionName)
  
  	if b.MaxExtension != 0 {
  		sub.ReceiveSettings.MaxExtension = b.MaxExtension
  		sub.ReceiveSettings.NumGoroutines = concurrency
  	}
  
  	ctx, cancel := context.WithCancel(context.Background())
  	go func() {
  		log.INFO.Print("[*] Waiting for messages. To exit press CTRL+C")
  
  		for {
  			select {
  			// A way to stop this goroutine from b.StopConsuming
  			case <-b.GetStopChan():
  				cancel()
  				return
  			default:
  				err := sub.Receive(ctx, func(_ctx context.Context, msg *pubsub.Message) {
  					deliveries <- msg
  				})
  
  				if err != nil {
  					log.ERROR.Printf("Error when receiving messages. Error: %v", err)
  					continue
  				}
  			}
  		}
  	}()
  
  	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