title: Springboot JMS LIstener ActiveMQ is very slow
body: <p>Im having a SpringBoot application which consume my custom serializable message from ActiveMQ Queue. So far it is worked, however, the consume rate is very poor, only 1 - 20 msg/sec.</p>
  
  <pre><code>@JmsListener(destination = "${channel.consumer.destination}", concurrency="${channel.consumer.maxConcurrency}")
  public void receive(IMessage message) {
      processor.process(message);
  }
  </code></pre>
  
  <p>The above is my channel consumer class's snippet, it has a processor instance (injected, autowired and inside it i have @Async service, so i can assume the main thread will be released as soon as message entering @Async method) and also it uses springboot activemq default conn factory which i set from application properties</p>
  
  <pre><code># ACTIVEMQ (ActiveMQProperties)
  spring.activemq.broker-url= tcp://localhost:61616?keepAlive=true
  spring.activemq.in-memory=true
  spring.activemq.pool.enabled=true
  spring.activemq.pool.expiry-timeout=1
  spring.activemq.pool.idle-timeout=30000
  spring.activemq.pool.max-connections=50
  </code></pre>
  
  <p>Few things worth to inform:<br>
  1. I run everything (Eclipse, ActiveMQ, MYSQL) in my local laptop<br>
  2. Before this, i also tried using custom connection factory (default AMQ, pooling, and caching) equipped with custom threadpool task executor, but still getting same result. Below is a snapshot performance capture which i took and updating every 1 sec<br>
  3. I also notive in JVM Monitor that the used heap keep incrementing
  <br></p>
  
  <p><a href="https://i.stack.imgur.com/Qbdur.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Qbdur.png" alt="My JVM Monitor Instance"></a></p>
  
  <p><a href="https://i.stack.imgur.com/1aMqd.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1aMqd.png" alt="Performance Counter Snapshot"></a></p>
  
  <p><br>
  I want to know:<br>
  1. Is there something wrong/missing from my steps?I can't even touch hundreds in my message rate<br>
  2. Annotated @JmsListener method will execute process async or sync?<br>
  3. If possible and supported, how to use traditional sync receive() with SpringBoot properly and ellegantly?<br></p>
  
  <p>Thank You </p>