jackdaw
jackdaw copied to clipboard
Type checks in jackdaw.client namespace should check for the interface and not the concrete classes
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)