Last active
January 15, 2017 16:24
-
-
Save tulios/8817e52968aaf76dd539dc2e9b616567 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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