elsa v0.12.3 Elsa

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.

Link to this section Summary

Types

named connection, must be an atom

endpoints to connect to kafka brokers

Functions

Define a default client name for establishing persistent connections to the Kafka cluster by producers and consumers. Useful for optimizing interactions by passing the identifier of a standing connection instead of instantiating a new one at each interaction, but when only a single connection is required, aleviating the need for the caller to differentiate and pass around a name.

Link to this section Types

Link to this type

connection()

connection() :: atom()

named connection, must be an atom

Link to this type

endpoints()

endpoints() :: [{hostname(), portnum()}]

endpoints to connect to kafka brokers

Link to this type

hostname()

hostname() :: atom() | String.t()
Link to this type

partition()

partition() :: non_neg_integer()
Link to this type

portnum()

portnum() :: pos_integer()
Link to this type

topic()

topic() :: String.t()

Link to this section Functions

Link to this function

create_topic(endpoints, topic, opts \\ [])

See Elsa.Topic.create/3.

Link to this function

default_client()

default_client() :: atom()

Define a default client name for establishing persistent connections to the Kafka cluster by producers and consumers. Useful for optimizing interactions by passing the identifier of a standing connection instead of instantiating a new one at each interaction, but when only a single connection is required, aleviating the need for the caller to differentiate and pass around a name.

Link to this function

delete_topic(endpoints, topic)

See Elsa.Topic.delete/2.

Link to this function

fetch(endpoints, topic, opts \\ [])

See Elsa.Fetch.fetch/3.

Link to this function

list_topics(endpoints)

See Elsa.Topic.list/1.

Link to this function

produce(endpoints_or_connection, topic, messages, opts \\ [])

See Elsa.Producer.produce/4.

Link to this function

topic?(endpoints, topic)

See Elsa.Topic.exists?/2.