Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

ruby/kafka: make publisher more configurable + fix tests #19

Merged
merged 3 commits into from
Jun 3, 2020

Conversation

mxmCherry
Copy link
Contributor

Tests were totally broken / all skipped - I missed a warning before.

@mxmCherry mxmCherry requested a review from dim May 28, 2020 15:44
@mxmCherry mxmCherry self-assigned this May 28, 2020
ruby/bps-kafka/lib/bps/kafka.rb Outdated Show resolved Hide resolved
ruby/bps-kafka/lib/bps/kafka.rb Outdated Show resolved Hide resolved
ruby/bps-kafka/lib/bps/kafka.rb Outdated Show resolved Hide resolved
ruby/bps-kafka/lib/bps/kafka.rb Outdated Show resolved Hide resolved
end

def topic(name)
Topic.new(@client, name)
producer = @client.producer(**@producer_opts)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the producer need to be closed explicitly? if so I suggest we memoize our topics

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dim I won't bother with thread-safety (mutex) for memo for now. Or should I?

ruby/bps-kafka/lib/bps/kafka.rb Outdated Show resolved Hide resolved
ruby/bps-kafka/spec/bps/kafka_spec.rb Outdated Show resolved Hide resolved
ruby/bps-kafka/lib/bps/kafka.rb Outdated Show resolved Hide resolved
@mxmCherry mxmCherry requested a review from dim June 1, 2020 10:40
@dim dim merged commit c9caee7 into master Jun 3, 2020
@mxmCherry mxmCherry deleted the feature/ruby-more-configurable-kafka-publisher branch June 3, 2020 11:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants