Skip to content

Instantly share code, notes, and snippets.

@sneako
Last active March 19, 2019 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sneako/ebadacd9bdff927a55182af6f88eac2a to your computer and use it in GitHub Desktop.
Save sneako/ebadacd9bdff927a55182af6f88eac2a to your computer and use it in GitHub Desktop.
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