Skip to content

Instantly share code, notes, and snippets.

@tulios
Last active January 15, 2017 16:24
Show Gist options
  • Save tulios/8817e52968aaf76dd539dc2e9b616567 to your computer and use it in GitHub Desktop.
Save tulios/8817e52968aaf76dd539dc2e9b616567 to your computer and use it in GitHub Desktop.
class MyHandler
include Phobos::Handler
def self.start(kafka_client)
# setup handler
end
def self.stop
# teardown
end
def self.around_consume(payload, metadata)
Phobos.logger.info "consuming..."
output = yield
Phobos.logger.info "done, output: #{output}"
end
def consume(payload, metadata)
# consume or skip message
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment