Thanks for your responses! I could finally solve the issue (I used something like this https://gist.github.com/fjavieralba/7930018)
Your references will be of great help, thanks! -- Javier Alba On Thursday, 12 de December de 2013 at 19:11, Jason Rosenberg wrote: > This is something we do routinely. We wrap the KafkaServer from java, it > works pretty well. You can use the KafkaServerStartable class, or the > KafkaServer class directly (in which case, you might need to do what we did > as described in: https://issues.apache.org/jira/browse/KAFKA-1101) > > > On Thu, Dec 12, 2013 at 8:07 AM, Jun Rao <[email protected] > (mailto:[email protected])> wrote: > > > You can take a look at KafkaServerTestHarness in our unit tests. > > > > Thanks, > > > > Jun > > > > > > On Thu, Dec 12, 2013 at 3:14 AM, Javier Alba <[email protected] > > (mailto:[email protected])> wrote: > > > > > Hi, > > > > > > I would like to embed a Kafka broker in my Java program, for testing > > > purposes. > > > > > > The idea is being capable of running a Junit test that starts a local > > kafka > > > broker, and then perform tests on some custom producers and consumers. > > > > > > After searching around, I've found some pieces of code but none of them > > > seem to work with Kafka 0.8 API. > > > > > > Does anyone know about any guide/best practice or code example I could > > use > > > for this purpose? > > > > > > Thanks in advance!
