Code refactoring. Add ElasticSearchWriteListener.