title: Apache Camel JMS memory leak?
body: <p>I am a newbie in using Apache camel, yet from various tests of mine I realize that using JMS  as a queue channel it creates a memory leak, as the used memory is not reduced after each message's consumption.</p>
  
  <p>a simple example would describe it better:</p>
  
  <pre><code>public static void main(String args[]) throws Exception {
      CamelContext context = new DefaultCamelContext();
      ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
      context.addComponent("experimental", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
      context.addRoutes(new RouteBuilder() {
          public void configure() {
              from("file://test").to("experimental:queue:test");
          }
      });
      context.addRoutes(new RouteBuilder() {
          public void configure() {
              from("experimental:queue:test").to("stream:out");
          }
      });
      Main main = new Main();
      main.getCamelContexts().add(context);
      main.run();
  }
  </code></pre>
  
  <p>Is there any way to force GC to clean the Queue or flush its content on demand?
  Is there a better way to Use Camel for such solutions?</p>
  
  <p>Cheers!</p>