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 Summary
Modifier and TypeMethodDescriptionvoid
addToBatch
(String topic, JsonValue event, StringBuilder payload) Adds an audit event to a batch payload.publishBatch
(String payload) Publishes the batch payload.
-
Method Details
-
addToBatch
Adds an audit event to a batch payload.- Parameters:
topic
- event topicevent
- event JSON payloadpayload
- batch payload- Throws:
BatchException
- indicates failure to add-to-batch
-
publishBatch
Publishes the batch payload.- Parameters:
payload
- batch payload- Returns:
- a simple promise encapsulating any potential batch exception
-