protected void flushBatch(){
  logger.debug("flushing batch, batch size {}",tupleBatch.size());
  for (  Message message : messageBatch) {
    try {
      producer.send(message);
    }
 catch (    JMSException ex) {
      throw new RuntimeException(ex);
    }
  }
  tupleBatch.clear();
  messageBatch.clear();
  logger.debug("done flushing batch");
}

protected void flushBatch ( ) { logger . debug ( "flushing batch, batch size {}" , tupleBatch . size ( ) ) ; for ( Message message : messageBatch ) { try { producer . send ( message ) ; } catch ( JMSException ex ) { throw new RuntimeException ( ex ) ; } } tupleBatch . clear ( ) ; messageBatch . clear ( ) ; logger . debug ( "done flushing batch" ) ; }
this is a helper method which flushes all the batched data .
