A pure Elixir client for 신경.
def deps do
[
{:singyeong, "~> 0.1.1"}
]
end
- Add children to your application's supervisor:
# The actual client that connects and sends/receives messages {Singyeong.Client, Singyeong.parse_dsn("singyeong://my_app_name:my_password@localhost:4567")}, # Event producer Singyeong.Producer, # Your event consumer MyApp.Consumer,
- Create a consumer:
defmodule MyApp.Consumer do use Singyeong.Consumer def start_link do Consumer.start_link __MODULE__ end def handle_event(event) do IO.inspect event, pretty: true :ok end end
- That's it! Start running your application whenever you want.