Interface BatchConsumer

All Known Implementing Classes:
ElasticsearchAuditEventHandler, JmsAuditEventHandler, SplunkAuditEventHandler

public interface BatchConsumer
Implementation is responsible for being able to build up a batch payload and to publish that payload.
  • Method Details

    • addToBatch

      void addToBatch(String topic, JsonValue event, StringBuilder payload) throws BatchException
      Adds an audit event to a batch payload.
      Parameters:
      topic - event topic
      event - event JSON payload
      payload - batch payload
      Throws:
      BatchException - indicates failure to add-to-batch
    • publishBatch

      Promise<Void,BatchException> publishBatch(String payload)
      Publishes the batch payload.
      Parameters:
      payload - batch payload
      Returns:
      a simple promise encapsulating any potential batch exception