code: func (b *Backend) GroupTaskStates(groupUUID string, groupTaskCount int) ([]*tasks.TaskState, error) {
  	conn, channel, err := b.Open(b.GetConfig().Broker, b.GetConfig().TLSConfig)
  	if err != nil {
  		return nil, err
  	}
  	defer b.Close(channel, conn)
  
  	queueState, err := b.InspectQueue(channel, groupUUID)
  	if err != nil {
  		return nil, err
  	}
  
  	if queueState.Messages != groupTaskCount {
  		return nil, fmt.Errorf("Already consumed: %v", err)
  	}
  
  	deliveries, err := channel.Consume(
  		groupUUID, // queue name
  		"",        // consumer tag
  		false,     // auto-ack
  		true,      // exclusive
  		false,     // no-local
  		false,     // no-wait
  		nil,       // arguments
  	)
  	if err != nil {
  		return nil, fmt.Errorf("Queue consume error: %s", err)
  	}
  
  	states := make([]*tasks.TaskState, groupTaskCount)
  	for i := 0; i < groupTaskCount; i++ {
  		d := <-deliveries
  
  		state := new(tasks.TaskState)
  		decoder := json.NewDecoder(bytes.NewReader([]byte(d.Body)))
  		decoder.UseNumber()
  		if err := decoder.Decode(state); err != nil {
  			d.Nack(false, false) // multiple, requeue
  			return nil, err
  		}
  
  		d.Ack(false) // multiple
  
  		states[i] = state
  	}
  
  	return states, nil
  }
docs: // GroupTaskStates returns states of all tasks in the group