title: How to maintain ActiveMQ connection open?
body: <p>I'm using Apache ActiveMQ to integrate my app to a custom service. I need to make this run always, not one time like it's right now. 
  The code below works, but only for one message, I need to maintain the connection active in order to receive all the messages. </p>
  
  <pre><code>using (var connection = (Apache.NMS.ActiveMQ.Connection)factory.CreateConnection())
  {
     connection.UserName = Username;
     connection.Password = Password;
  
     using (var session = connection.CreateSession())
     {
          IDestination destination = SessionUtil.GetDestination(session, "queue://" + Queue);
  
          using (IMessageConsumer consumer = session.CreateConsumer(destination))
          //using (IMessageConsumer consumer = session.CreateDurableConsumer(new ActiveMQTopic(Queue), "fpapp", null, false))
          {
              consumer.Listener += ConsumerOnListener;
              connection.Start();
          }
      }
  }
  </code></pre>
  
  <p>I did some research and found out I should create a durable consumer, and that's what I tried  (commented line). But it doesn't work, it says network connections can't subscribe to topics.</p>
  
  <p>Any ideas?</p>
  
  <p>PS: I'm completely new to ActiveMQ.</p>
  
  <p>Thanks</p>