code: func (b *Backend) GetState(taskUUID string) (*tasks.TaskState, error) {
  	declareQueueArgs := amqp.Table{
  		// Time in milliseconds
  		// after that message will expire
  		"x-message-ttl": int32(b.getExpiresIn()),
  		// Time after that the queue will be deleted.
  		"x-expires": int32(b.getExpiresIn()),
  	}
  	conn, channel, _, _, _, err := b.Connect(
  		b.GetConfig().Broker,
  		b.GetConfig().TLSConfig,
  		b.GetConfig().AMQP.Exchange,     // exchange name
  		b.GetConfig().AMQP.ExchangeType, // exchange type
  		taskUUID,                        // queue name
  		false,                           // queue durable
  		true,                            // queue delete when unused
  		taskUUID,                        // queue binding key
  		nil,                             // exchange declare args
  		declareQueueArgs,                // queue declare args
  		nil,                             // queue binding args
  	)
  	if err != nil {
  		return nil, err
  	}
  	defer b.Close(channel, conn)
  
  	d, ok, err := channel.Get(
  		taskUUID, // queue name
  		false,    // multiple
  	)
  	if err != nil {
  		return nil, err
  	}
  	if !ok {
  		return nil, errors.New("No state ready")
  	}
  
  	d.Ack(false)
  
  	state := new(tasks.TaskState)
  	decoder := json.NewDecoder(bytes.NewReader([]byte(d.Body)))
  	decoder.UseNumber()
  	if err := decoder.Decode(state); err != nil {
  		log.ERROR.Printf("Failed to unmarshal task state: %s", string(d.Body))
  		log.ERROR.Print(err)
  		return nil, err
  	}
  
  	return state, nil
  }
docs: // GetState returns the latest task state. It will only return the status once
  // as the message will get consumed and removed from the queue.