Skip to content

Instantly share code, notes, and snippets.

@tulios
Created January 15, 2017 16:18
Show Gist options
  • Save tulios/9c207b7fdc0dd47b6a748f7e28d5d4b1 to your computer and use it in GitHub Desktop.
Save tulios/9c207b7fdc0dd47b6a748f7e28d5d4b1 to your computer and use it in GitHub Desktop.
class MyHandler
include PhobosDBCheckpoint::Handler
def consume(payload, metadata)
my_event = JSON.parse(payload)
# <-- your logic (which possibly skips messages) here
ack(my_event['id'], Time.now)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment