Skip to content

Instantly share code, notes, and snippets.

@sneako
Last active Mar 19, 2019
Embed
What would you like to do?
Kinesis Pool
defmodule KinesisWriter do
use Application
def start(_type, _args) do
children = [
:poolboy.child_spec(
:kinesis_writer_pool,
[
name: {:local, :kinesis_writer_pool},
worker_module: KinesisWriter.Worker,
size: 3,
max_overflow: 5,
strategy: :fifo
],
[]
),
...other children...
]
opts = [strategy: :one_for_one, name: KinesisWriter.Supervisor]
Supervisor.start_link(children, opts)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment