IBMStockTrader / portfolio

Microservice implemented with MicroProfile that persists stock portfolios to JDBC (such as DB2)
Apache License 2.0
7 stars 60 forks source link

Consider requiring Kafka connection to start #26

Open evie-lau opened 5 years ago

evie-lau commented 5 years ago

In trying to utilize using Kafka with IBM Event Stream, I think it is best to ensure that Kafka is able to connect properly with an event stream to avoid data going out of sync (between portfolio and the event stream).

This may add some overhead work to make sure secrets are setup properly.

The same should be done on any consumers to ensure that they only consume when they are able to correctly process/store the consumed events.

Usually the logs look like this:

log:[WARNING ] Failure sending message to Kafka
log:[WARNING ] java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.SslAuthenticationException: SSL handshake failed
log: Caused by: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
evie-lau commented 5 years ago

Additionally, when buying/selling stock, sometimes I come across this log message: log:[WARNING ] Unable to get the stock price. Skipping sending the StockPurchase to Kafka

This should also not happen if we wish to keep portfolio in sync with Consumers reading from the Event Stream.