elsa v0.4.1 Elsa.Fetch
Provides functions for doing one-off retrieval of messages from the Kafka cluster.
Link to this section Summary
Functions
A simple interface for quickly retrieving a message set from the cluster on the given topic. Partition and offset may be specified as keyword options, defaulting to 0 in both cases if either is not supplied by the caller.
Retrieves all messages on a given topic across all partitions, ordering by the timestamp attached to the message.
Retrieves an array of messages containing the supplied search string,
sorted by time and with the partition and offset for reference. Search can
be limited by an offset and time which are passed through to fetch_all/3 call
retrieving the messages to search. By default, the search is applied against
the message values but can be optionally switched to search on the message key
by supplying the search_by_key: true
option.
Link to this section Functions
fetch(endpoints, topic, opts \\ [])
A simple interface for quickly retrieving a message set from the cluster on the given topic. Partition and offset may be specified as keyword options, defaulting to 0 in both cases if either is not supplied by the caller.
fetch_all(endpoints, topic, opts \\ [])
Retrieves all messages on a given topic across all partitions, ordering by the timestamp attached to the message.
search(endpoints, topic, search_term, opts \\ [])
Retrieves an array of messages containing the supplied search string,
sorted by time and with the partition and offset for reference. Search can
be limited by an offset and time which are passed through to fetch_all/3 call
retrieving the messages to search. By default, the search is applied against
the message values but can be optionally switched to search on the message key
by supplying the search_by_key: true
option.