kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Psaltis <psaltis.and...@gmail.com>
Subject Re: Why do I need to specify replication factor when creating a topic?
Date Fri, 12 May 2017 05:16:26 GMT
I'm not sure if this is an option for you. However, I have been faced with
a similar problem before and we handled it by putting all of the
information needed to connect and use the Kafka API's in a config file. In
our case we were using Typesafe config [1] for lots of configuration in our
services. It has quite a few nice features and we were able to change the
values based on the environment with Puppet and Chef, I'm not sure if you
are using these or other tools in the DevOps space.

Hope that helps. Ping me offline if you want to chat about it more.


On Thu, May 11, 2017 at 19:43 Jeff Widman <jeff@netskope.com> wrote:

> To further clarify:
> I'm trying to create topics programmatically.
> We want to run our code against dev/staging/production clusters. In dev,
> they are often single-broker clusters. In production, we default to
> replication factor of 3.
> So that's why it'd make life easier if it defaulted to the value in
> server.properties, rather than our code having to figure out whether it's a
> dev vs produciton cluster.
> I'm aware we could hack around this by relying on topic auto-creation, but
> we'd rather disable that to prevent topics being accidentally created.
> On Thu, May 11, 2017 at 4:07 PM, Jeff Widman <jeff@netskope.com> wrote:
> > When creating a new topic, why do I need to specify the replication
> factor
> > and number of partitions?
> >
> > I'd rather than when omitted, Kafka defaults to the value set in
> > server.properties.
> >
> > Was this an explicit design decision?
> >

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message