title: Apache JMeter: How to to send multiple messages using a single JMS Publisher
body: <p>I am using Apache JMeter for load testing JMS consumer. My test plan is to publish messages directly to JMS Topic from which my MDB will read messages and process.</p>
  
  <p>I have a requirement where each thread sends messages as below:</p>
  
  <ol>
  <li><p>1-session messages with unique sessionID.</p></li>
  <li><p>10-request messages corresponding to above session. Here each message must have unique requestIDs. </p></li>
  </ol>
  
  <p>My messages are JSONObjects.</p>
  
  <p>Currently in my Test Plan, I have created 11-JMS Publishers(1-for session and 10-for requests) to send messages. And I ran the test with 200 threads for 10minutes. Maximum time taken was around ~6000ms, which is huge.</p>
  
  <p>Questions:</p>
  
  <ol>
  <li><p>Is there a way to send multiple messages using a single JMS Publisher ? 
  Note: I can not use "Number of messages to aggregate", as each message should have a unique ID.</p></li>
  <li><p>Does each JMS Publisher creates a JMS connection, even if all are running as part of a single thread ? If yes, Please suggest how to avoid.</p></li>
  </ol>
  
  <p>Looking forward to hear from experts.</p>
  
  <p>Thanks in Advance.</p>