title: How can I throttle the amount of messages coming from ActiveMQ in my C# app?
body: <p>I'm using ActiveMQ in a .Net program and I'm flooded with message-events.</p>
  
  <p>In short when I get a queue-event 'onMessage(IMessage receivedMsg)' I put the message into an internal queue out of which X threads do their thing.</p>
  
  <p>At first I had: 'AcknowledgementMode.AutoAcknowledge' when creating the session so I'm guessing that all the messages in the queue got sucked down and put into the memory queue (which is risky since with a crash, everything is lost).</p>
  
  <p>So then I used: 'AcknowledgementMode.ClientAcknowledge' when creating the session, and when a worker was ready with the message it calls the 'commit()' method on the message. However, still all the messages get sucked down from the queue.</p>
  
  <p>How can I configure it that ONLY an X amount of messages are being processed or are in an internal queue, and that not everything is being 'downloaded' right away?</p>