Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type checks in jackdaw.client namespace should check for the interface and not the concrete classes #280

Open
dfbernal opened this issue Dec 10, 2020 · 0 comments

Comments

@dfbernal
Copy link

Currently running into an issue were I'm trying to pass a MockProducer to the partitions-for function but the function is throwing the Got non producer/consumer! error. This is because MockProducer is not of type KafkaProducer but rather implements the Producer interface. I think if we change this type checking to be Producer instead then we'll have the ability to use Mocks along with jackdaw.

(instance? KafkaConsumer producer-or-consumer)
             (.partitionsFor ^KafkaConsumer producer-or-consumer topic-name)

(instance? KafkaProducer producer-or-consumer)
             (.partitionsFor ^KafkaProducer producer-or-consumer topic-name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant