Behaviours: supervisor3.
brod supervisor
Hierarchy: brod_sup (one_for_one) | +--client_1 | | | +-- producers_sup level 1 | | | | | +-- producers_sup level 2 for topic 1 | | | | | | | +-- partition_0_worker | | | | | | | +-- partition_1_worker | | | |... | | | | | +-- producers_sup level 2 for topic 2 | | | |... | | |... | | | +-- consumers_sup level 1 | | | +-- consumer_sup level 2 for topic 1 | | | | | +-- partition_0_worker | | | | | +-- partition_1_worker | | |... | | | +-- consumer_sup level 2 for topic 2 | | |... | |... | +-- client_2 | |... |...find_client/1 | |
init/1 | supervisor3 callback. |
post_init/1 | supervisor3 callback. |
start_client/3 | |
start_link/0 | Start root supervisor. |
stop_client/1 |
find_client(Client::brod:client_id()) -> [pid()]
init(X1) -> any()
supervisor3 callback
post_init(X1) -> any()
supervisor3 callback.
start_client(Endpoints::[brod:endpoint()], ClientId::brod:client_id(), Config::brod:client_config()) -> ok | {error, any()}
start_link() -> {ok, pid()}
Start root supervisor.
To start permanent clients add 'clients' section in sys.config. So far only 'endpoints' config is mandatory, other options are optional.
[ %% Permanent clients { clients , [ {client_1 %% unique client ID , [ {endpoints, [{"localhost", 9092}]} , {restart_delay_seconds, 10} , {get_metadata_timeout_seconds, 5} , {reconnect_cool_down_seconds, 1} , {allow_topic_auto_creation, true} , {auto_start_producers, false} , {default_producer_config, []} ] } ] } ].
stop_client(ClientId::brod:client_id()) -> ok | {error, any()}
Generated by EDoc