while (running) {
Iterator<Stock> i = stocksList.iterator();
while (i.hasNext()) {
Stock stock = i.next();
simulateChange(stock);
Message msg = createStockMessage(session, stock);
msg.setStringProperty("symbol", stock.getSymbol());
quotesProducer.send(msg);
try {
Thread.sleep(500);
} catch (InterruptedException e) {
}