Class ElasticSearchEventEmitter

  • All Implemented Interfaces:
    AutoCloseable, org.jbpm.persistence.api.integration.EventEmitter

    public class ElasticSearchEventEmitter
    extends Object
    implements org.jbpm.persistence.api.integration.EventEmitter
    Basic ElasticSearch implementation of EventEmitter that simply pushes out data to ElasticSearch server. It performs all the operation in the background thread but does not do any intermediate data persistence, meaning it can result in data lost in case of server crashes. This event emitter expects following parameters to configure itself - via system properties
    • org.jbpm.event.emitters.elasticsearch.date_format - date and time format to be sent to ElasticSearch - default format is yyyy-MM-dd'T'HH:mm:ss.SSSZ
    • org.jbpm.event.emitters.elasticsearch.url - location of the ElasticSearch server - defaults to http://localhost:9200
    • org.jbpm.event.emitters.elasticsearch.user - optional user name for authentication to ElasticSearch server
    • org.jbpm.event.emitters.elasticsearch.password - optional password for authentication to ElasticSearch server
    NOTE: Optional authentication is a BASIC authentication.
    • Constructor Detail

      • ElasticSearchEventEmitter

        public ElasticSearchEventEmitter()
    • Method Detail

      • deliver

        public void deliver​(Collection<org.jbpm.persistence.api.integration.InstanceView<?>> data)
        Specified by:
        deliver in interface org.jbpm.persistence.api.integration.EventEmitter
      • apply

        public void apply​(Collection<org.jbpm.persistence.api.integration.InstanceView<?>> data)
        Specified by:
        apply in interface org.jbpm.persistence.api.integration.EventEmitter
      • drop

        public void drop​(Collection<org.jbpm.persistence.api.integration.InstanceView<?>> data)
        Specified by:
        drop in interface org.jbpm.persistence.api.integration.EventEmitter
      • newCollection

        public org.jbpm.persistence.api.integration.EventCollection newCollection()
        Specified by:
        newCollection in interface org.jbpm.persistence.api.integration.EventEmitter
      • close

        public void close()
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface org.jbpm.persistence.api.integration.EventEmitter
      • buildClient

        protected org.apache.http.impl.client.CloseableHttpClient buildClient()