elsa v0.9.0 Elsa.Producer.Manager
Define a to create and monitor producer processes for a given topic, one per topic partition. The manager will attempt to start a named client if one doesn't already exist. Once the client is started, The producer manager starts and monitors producers for the topic, ensuring they can be supervised in the event the client crashes and restarts.
Because the brod client process takes ownership of producers, individual producer processes that exit abnormally are restarted by the client. However, the client doesn't keep track of its managed producers in the event of an exit. The manager takes this responsibility, restarting re-registering the producers to the desired client.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Reads the configuration for the client and producers from the arguments and starts the requested producer processes.
Link to this section Functions
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor.
init(opts)
Reads the configuration for the client and producers from the arguments and starts the requested producer processes.
When starting the producers, the client is started and a the manager reduces over the list of topic partitions, starting and monitoring each one.