Skip to content

Commit

Permalink
Normalize topic names by using symbols (#6)
Browse files Browse the repository at this point in the history
close #3
  • Loading branch information
sarcilav authored Mar 8, 2019
1 parent fad511c commit 8fa229a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fake/kafka/consumer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ def initialize(kafka)
end

def subscribe(topic, **)
@topics << topic
@topics << topic.to_sym
end

def each_message(*options, &block)
@kafka.messages.each do |message|
next unless @topics.include?(message.topic)
next unless @topics.include?(message.topic.to_sym)

begin
block.call(message)
Expand Down

0 comments on commit 8fa229a

Please sign in to comment.