title: How to timeout rabbitmq consumer ?
body: <p>I have rabbitmq consuming the queue but once client is subscribed it stays consuming queue forever. Is there a timeout to declare and exit i.e. after queue is empty ?</p>
  
  <pre><code> msgs, err := ch.Consume(
                  q.Name, // queue
                  "",     // consumer
                  true,   // auto-ack
                  false,  // exclusive
                  false,  // no-local
                  false,  // no-wait
                  nil,    // args
          )
  for msg := range msgs { 
                  log.Printf("Received message with message: %s", msg.Body)
  }
  </code></pre>