Packages

This application accumulates and sends data in batches to AWS Firehose

Current section

Files

Jump to
firehose lib sample_events_manager.ex
Raw

lib/sample_events_manager.ex

defmodule SampleEventsManager do
use Firehose.Manager
def subscribe(:failed, %Firehose.Batch{} = _batch, _aws_response) do
# This callback is triggered when retry count exhausted and batch not delivered.
# You can add specific logic for this case (write data to queue or database etc) or
# send metrics to monitoring service
end
def subscribe(:completed, %Firehose.Batch{stream: _stream, size: _batch_size, records: _records}) do
# This callback is triggered after each successfull delivery to Firehose.
# You can use this callback to send metrics to monitoring service
end
end