Last active
March 19, 2019 12:14
-
-
Save sneako/ebadacd9bdff927a55182af6f88eac2a to your computer and use it in GitHub Desktop.
Kinesis Pool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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