redix_stream v0.1.0 Redix.Stream
Documentation for Redix.Stream.
Link to this section Summary
Functions
Provides a supervisable specification for a consumer which consumes from the given topic or topics
Produces a new single message in a Redis stream
Link to this section Types
Link to this section Functions
Link to this function
consumer(redix, stream, callback)
consumer(redix(), t(), function() | mfa()) :: Supervisor.Spec.spec()
Provides a supervisable specification for a consumer which consumes from the given topic or topics.
Examples
iex> Redix.Stream.consumer(:redix, "topic", fn msg -> msg end)
iex> Redix.Stream.consumer(:redix, "topic", {Module, :function, [:arg1, :arg2]})
Link to this function
produce(redix, stream, key, value)
Produces a new single message in a Redis stream.
Examples
iex> Redix.Stream.produce(:redix, "topic", "temperature", 55)