Is this for unit tests? Or do you need an embedded Kafka / ZK inside an app?
Or do you mean launching an external Kafka cluster, but without command line?

For unit tests / embedded, you can see this example:
https://gist.github.com/vmarcinko/e4e58910bcb77dac16e9

To start an actual Kafka server through an API call, you typically
need some kind of agent to take the API call and launch Kafka.
Cloudera Manager has an API that can do this, and I'm sure Ambari can
do the same.

Gwen

On Tue, Jul 7, 2015 at 10:43 AM, Jeff Gong <j.gon...@gmail.com> wrote:
> Hi all,
>
> Is it possible to launch Kafka/Zookeeper servers via some part of the API?
> I noticed in this:
> http://stackoverflow.com/questions/16946778/how-can-we-create-a-topic-in-kafka-from-the-ide-using-api/
> that it seems to be possible to create a ZK instance and add a topic to it,
> but is this the same as launching the ZK server as we would in the command
> line?
>
> Similarly, would it be possible to do this for a Kafka server and have it
> connect to an existing ZK connection?
>
> Thanks!

Reply via email to