Skip to content

Commit

Permalink
Improve the #inspect formatting of Racecar::Message
Browse files Browse the repository at this point in the history
Messages now display the topic, partition, and offset when inspected.
  • Loading branch information
dasch committed Aug 26, 2020
1 parent d7a7719 commit 66d42d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/racecar/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ def create_time
def ==(other)
@rdkafka_message == other.instance_variable_get(:@rdkafka_message)
end

def inspect
"#{topic}/#{partition}:#{offset}"
end
end
end

0 comments on commit 66d42d3

Please sign in to comment.