Re: Kafka Mock

2014-04-30 Thread Matt Narrell
Thanks Clark. -Matt On Apr 30, 2014, at 11:04 AM, Clark Breyman wrote: > Matt - > Here's a small Gist that shows some of the setup for > Consumer.createJavaConsumer(). > https://gist.github.com/clarkbreyman/548f25ad78c4bb4a7df7 > > -Clark > > > On Wed, Apr 30, 2014 at 7:33 AM, Matt Narrell wr

Re: Kafka Mock

2014-04-30 Thread Mike Marzo
I will have a look. Thanks mike marzo 908 209-4484 On Apr 30, 2014 4:56 PM, "Olson,Andrew" wrote: > You might take a look at the KafkaServerTestHarness [1] if you’re not > already familiar with it. It’s not exactly “mock”, but it makes it easy to > test Kafka functionality without needing to co

Re: Kafka Mock

2014-04-30 Thread Olson,Andrew
You might take a look at the KafkaServerTestHarness [1] if you’re not already familiar with it. It’s not exactly “mock”, but it makes it easy to test Kafka functionality without needing to connect to any external broker or ZK processes. We ported this test harness to Java for our junit and integ

Re: Kafka Mock

2014-04-30 Thread Clark Breyman
Matt - Here's a small Gist that shows some of the setup for Consumer.createJavaConsumer(). https://gist.github.com/clarkbreyman/548f25ad78c4bb4a7df7 -Clark On Wed, Apr 30, 2014 at 7:33 AM, Matt Narrell wrote: > Clark, > > Would you attach a small example of this mocking of > Consumer.createJava

Re: Kafka Mock

2014-04-30 Thread Jay Kreps
With the new Java Kafka clients we are shipping a mock producer and consumer. E.g. https://github.com/apache/kafka/blob/0.8.1/clients/src/main/java/org/apache/kafka/clients/producer/MockProducer.java I suppose that doesn't help you now unless you are using the new producer already, but at least we

Re: Kafka Mock

2014-04-30 Thread Matt Narrell
Clark, Would you attach a small example of this mocking of Consumer.createJavaConsumer please? Thanks, Matt On Apr 30, 2014, at 6:39 AM, Clark Breyman wrote: > Mike, > > It's nowhere near a full broker, but I've had luck with using PowerMock > (Mockito version) since it can mock out the > st

Re: Kafka Mock

2014-04-30 Thread Clark Breyman
Mike, It's nowhere near a full broker, but I've had luck with using PowerMock (Mockito version) since it can mock out the static Consumer.createJavaConsumerConnector and the java Producer constructor. It doesn't guarantee that your mocks behave like Kafka but it's something. If you find/create som

Re: Kafka Mock

2014-04-29 Thread Mike Marzo
looking to see if someone has implemented an inMemory style broker such that i can junit my producer and consumer code in absence of a real kafka broker listening somewhere. The scaffolding of having to spin up even a singleton broker and zk for the purpose of continuous build and junit test is hea

Re: Kafka Mock

2014-04-29 Thread Guozhang Wang
Hi Mike, Do you just need a socket server which someone can talk to following the kafka server protocol or you need other funtionalities of the server? Guozhang On Tue, Apr 29, 2014 at 10:41 AM, Mike Marzo wrote: > Is there any good mock impls of kafka that can be leveraged in junit tests? >

Kafka Mock

2014-04-29 Thread Mike Marzo
Is there any good mock impls of kafka that can be leveraged in junit tests?