Please advise right code to put in Java Listener class to send all incoming steaming quotes to MySQL database.
When I put :
conn.insert(sql);
sql = "INSERT INTO MarketData (`No`, `Symbol`, `BidPx`, `OfferPx`, `TimeStamp`) VALUES ('"+ incomingQuote.getQuoteID() + "','" + incomingQuote.getInstrument().getSymbol() + "','" + incomingQuote.getAskOpen() + "','" + incomingQuote.getBidOpen() + "','" + incomingQuote.getOpenTimestamp() + "')";
Java send to DB only one record for each pair and after stops sending. Means I can see quotes on terminal display but they are not collecting in database.
When I stop JM and restart I have another one set of quotes.
When I put :
conn.insert(sql);
sql = "INSERT INTO MarketData (`No`, `Symbol`, `BidPx`, `OfferPx`, `TimeStamp`) VALUES ('"+ incomingQuote.getQuoteID() + "','" + incomingQuote.getInstrument().getSymbol() + "','" + incomingQuote.getAskOpen() + "','" + incomingQuote.getBidOpen() + "','" + incomingQuote.getOpenTimestamp() + "')";
Java send to DB only one record for each pair and after stops sending. Means I can see quotes on terminal display but they are not collecting in database.
When I stop JM and restart I have another one set of quotes.
Comment