elsa v0.7.0 Elsa.Producer.Manager
Defines functions for starting persistent kafka producer processes that can be managed by a consuming application supervisor.
Link to this section Summary
Functions
Start a named process for handling subsequent produce_sync requests to write messages to a topic. Producer processes are bound to a specific topic. The producer process requires and is managed by a client process, so the client pid is returned to allow for adding the client (and thus the producer) to an application's supervision tree. If the name option is not supplied to the producer's config, the default client name is used.
Stops the named producer process and cleans up entries from the supervisor's child process table in ets.
Link to this section Functions
start_producer(endpoints, topic, config \\ [])
Start a named process for handling subsequent produce_sync requests to write messages to a topic. Producer processes are bound to a specific topic. The producer process requires and is managed by a client process, so the client pid is returned to allow for adding the client (and thus the producer) to an application's supervision tree. If the name option is not supplied to the producer's config, the default client name is used.
stop_producer(client \\ Elsa.default_client(), topic)
Stops the named producer process and cleans up entries from the supervisor's child process table in ets.