Envío → fancy wrapper for Elixir Registry
Envío is a set of handy tools to simplify dealing with Elixir Registry. It includes the instance of Registry to be used out of the box, as well as scaffolds to ease producing of publishers and subscribers.
defmodule MySubscriber do
use Envio.Subscriber, channels: [{MyPublisher, :main}]
def handle_envio(message, state) do
{:noreply, state} = super(message, state)
IO.inspect({message, state}, label: "Received")
{:noreply, state}
end
end
Read next How to Build a Back-Pressure Queuing System in Elixir with sbroker