title: Is there a timeout for acking RabbitMQ messages?
body: <p>I would like to set a timeout after which a dequeued message is automatically NACKed.</p>
  
  <p>When I dequeue a message I wait until it is transfered over a socket and the other party confirms its reception.</p>
  
  <p>Do I need to keep a list of Timers or can RMQ handle this automatically?</p>
  
  <pre><code>private void Run()
  {
      _rmqConnection = _queueConnectionFactory.CreateFactory().CreateConnection();
  
      _rmqReadchannel = _rmqConnection.CreateModel();
  
      _rmqReadchannel.QueueDeclare(QueueIdOutgoing(), true, false, false, null);
  
      _rmqReadchannel.BasicQos(0, 1, false);
      var consumer = new QueueingBasicConsumer(_rmqReadchannel);
      _rmqReadchannel.BasicConsume(QueueIdOutgoing(), false, consumer);
      while (true)
      {
          if (!_rmqReadchannel.IsOpen)
          {
              throw new Exception("Channel is closed");
          }
          var ea = consumer.Queue.Dequeue();
          string jsonData = Encoding.UTF8.GetString(ea.Body);
          if (OnOutgoingMessageReady != null)
          {
              OnOutgoingMessageReady(this, new QueueDataEventArgs(jsonData, ea.DeliveryTag));
          }
          //waiting for ACK from a different thread
      }
  }
  </code></pre>