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 something better, please let us know!

- Clark


On Tue, Apr 29, 2014 at 11:54 AM, Mike Marzo
<precisionarchery...@gmail.com>wrote:

> 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 heavy lifting. For JMS transports I have traditionally used an instance
> of activeMQ run in my junits jvm for this purpose and its clean and simple.
> Was looking to see if someone had a kafka analog.
>
>
> On Tue, Apr 29, 2014 at 2:06 PM, Guozhang Wang <wangg...@gmail.com> wrote:
>
> > 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
> > <precisionarchery...@gmail.com>wrote:
> >
> > > Is there any good mock impls of kafka that can be leveraged in junit
> > tests?
> > >
> >
> >
> >
> > --
> > -- Guozhang
> >
>

Reply via email to