Skip to content

Instantly share code, notes, and snippets.

@dasch
Created September 6, 2017 07:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dasch/eadfac9b2e95b4f0ba9ff0b3043a1e0c to your computer and use it in GitHub Desktop.
Save dasch/eadfac9b2e95b4f0ba9ff0b3043a1e0c to your computer and use it in GitHub Desktop.
module EventLog
AVRO = AvroTurf.new(schemas_path: "app/schemas/")
def self.publish(event_name, payload = {})
data = AVRO.encode(payload, schema_name: event_name)
DeliveryBoy.deliver(data, topic: event_name)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment