title: Spring JTA Atomikos Only 7 messages consumes and all dequeued
body: <p>I've a simple Spring-boot application with JTA base on Atomikos Transaction Manager. It consumes messages from a queue and logs them. The problem is that after the 7th incoming message the rest of the message in the queue are dequeued <em>but are not processed</em>. I realized that this performance is looping, I mean:</p>
  
  <ol>
  <li>Inserted 10 messages in the queue.</li>
  <li>Processed and dequeued 1st message.</li>
  <li>Processed and dequeued 2nd message.</li>
  <li>Processed and dequeued 3rd message.</li>
  <li>Processed and dequeued 4th message.</li>
  <li>Processed and dequeued 5th message.</li>
  <li>Processed and dequeued 6th message.</li>
  <li>Processed 7th message and dequeued 7th,8th,9th and 10th messages.</li>
  <li>Inserted other 10 messages in the queue.</li>
  <li>Processed and dequeued 11th message.</li>
  <li>Processed and dequeued 12th message.</li>
  <li>Processed and dequeued 13th message.</li>
  <li>Processed and dequeued 14th message.</li>
  <li>Processed and dequeued 15th message.</li>
  <li>Processed and dequeued 16th message.</li>
  <li>Processed 17th message and dequeued 17th,18th,19th and 20th messages.</li>
  </ol>
  
  <p>Moreover, I realized that without the transaction manager enabled it processes and consumes all the message in the queue.</p>
  
  <p>Is there any bug or configuration that I forgot about that point?</p>
  
  <p>You can find the full code on: <a href="https://github.com/PedroRamirezTOR/spring-jta-amq.git" rel="nofollow noreferrer">https://github.com/PedroRamirezTOR/spring-jta-amq.git</a></p>