How to keep ElasticSearch in sync with a database using LogStash

Have you seen the Logstash JDBC input? https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html