Skip to content

Instantly share code, notes, and snippets.

@claytongentry
Last active May 7, 2017 03:10
Show Gist options
  • Save claytongentry/4a8a5cae8f0d3182367336eb6267af76 to your computer and use it in GitHub Desktop.
Save claytongentry/4a8a5cae8f0d3182367336eb6267af76 to your computer and use it in GitHub Desktop.
defmodule MyApp.MySubscriber do
def handle(%{"tag" => "a_tag"} = data, _meta) do
MyApp.MyModule.handle_event data
end
def handle(%{"tag" => "another_tag"} = data, _meta) do
MyApp.MyOtherModule.handle_event data
end
def handle(_payload, _meta) do
# noop
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment