defmodule MyApp.JetstreamLogger do use JetstreamLibrary, kinds: [] # all, collections: [] # all require Logger def get_cursor, do: nil def put_cursor(_seq), do: :ok def handle_event(payload), do: Logger.info(inspect(payload)) end # add it to your application.ex @impl true def start(_type, _args) do children = [ MyApp.JetstreamLogger, MyAppWeb.MetricsEndpoint ] # See https://hexdocs.pm/elixir/Supervisor.html # for other strategies and supported options opts = [strategy: :one_for_one, name: Shelf.Supervisor] Supervisor.start_link(children, opts) end