code: func (b *Broker) StopConsuming() {
  	// Stop the receiving goroutine
  	b.stopReceivingChan <- 1
  	// Waiting for the receiving goroutine to have stopped
  	b.receivingWG.Wait()
  
  	// Stop the delayed tasks goroutine
  	b.stopDelayedChan <- 1
  	// Waiting for the delayed tasks goroutine to have stopped
  	b.delayedWG.Wait()
  
  	b.Broker.StopConsuming()
  
  	// Waiting for any tasks being processed to finish
  	b.processingWG.Wait()
  
  	if b.pool != nil {
  		b.pool.Close()
  	}
  }
docs: // StopConsuming quits the loop