public final void sendMessages(ClientSession session,ClientProducer producer,int numMessages) throws ActiveMQException {
  for (int i=0; i < numMessages; i++) {
    producer.send(createMessage(session,i,true));
  }
}

public final void sendMessages ( ClientSession session , ClientProducer producer , int numMessages ) throws ActiveMQException { for ( int i = 0 ; i < numMessages ; i ++ ) { producer . send ( createMessage ( session , i , true ) ) ; } }
send durable messages with pre - specified body .
