elsa v0.10.0 API Reference
Modules
Provides public api to Elsa. Top-level short-cuts to sub-module functions for performing basic interactions with Kafka including listing, creating, deleting, and validating topics. Also provides a function for one-off produce_sync of message(s) to a topic.
Define the behaviour and default implementations of functions for creating message handlers that will be called by Elsa worker processes.
Provides functions for doing one-off retrieval of messages from the Kafka cluster.
Centralizes definition for common functions related to consumer interactions.
Supervisor that starts and manages brod consumer processes, one per topic/partition by way of the Elsa Wrapper GenServer.
Handles acknowledgement of messages directly back to the Kafka cluster rather than the default behavior of routing acks through the interposing group coordinator supplied by brod. This allows for a drain functionality when the group coordinator has been told to exit and thus will no longer route pending acks to the cluster.
Defines the GenServer process that coordinates assignment of workers to topics/partitions of a given consumer group. Tracks consumer group state and reinstantiates workers to the last unacknowledged message in the event of failure.
The running state of the consumer group manager process.
Provides functions to encapsulate the management of worker processes by the consumer group manager.
Tracks the running state of the worker process from the perspective of the group manager.
Orchestrates the creation of dynamic supervisor and worker processes for per-topic consumer groups, manager processes for coordinating topic/partition assignment, and a registry for differentiating named processes between consumer groups.
Defines the worker GenServer that is managed by the DynamicSupervisor. Workers are instantiated and assigned to a specific topic/partition and process messages according to the specified message handler module passed in from the manager before calling the manager's ack function to notify the cluster the messages have been successfully processed.
The running state of the worker process.
Defines the structure of a Kafka message provided by the Elsa library and the function to construct the message struct.
Defines functions to write messages to topics based on either a list of endpoints or a named client. All produce functions support the following options
Provides functions for automatically selecting the topic partition to write a message.
Supervisor that starts and manages brod producer processes, one per topic/partition by way of the Elsa Wrapper GenServer.
Implements a custom version of the Registry for Elsa, allowing the registration of shared processes like brod clients as well as processes started under brod supervision.
Top-level supervisor that orchestrates all other components of the Elsa library. Allows for a single point of integration into your application supervision tree and configuration by way of a series of nested keyword lists
Provides functions for managing and interacting with topics in the Kafka cluster.
Provides functions for simplifying first-class interactions (consuming and producing) such as connecting to a cluster and establishing a persistent client process for interacting with a cluster.
Provides a supervisable wrapper for the Elsa supervision tree to manage brod producers and consumers. Provides convenience functions for starting producer and consumer processes directly without the default supervisors brod interposes between them and the application.