kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Black <ross.w.bl...@gmail.com>
Subject Re: Anything common gotchas we should add to the FAQ?
Date Fri, 01 Jun 2012 00:59:06 GMT
I just fell into the trap of using:

        Properties props = new Properties();
        props.put("compression.codec", 2);
        ProducerConfig config = new ProducerConfig(props);

instead of

        props.put("compression.codec", "2");

or (better because it forces a string)

        props.setProperty("compression.codec", "2");

Using an int value means that no compression occurs, and no errors/warnings
are emitted.

Ross



On 30 May 2012 13:45, Jun Rao <junrao@gmail.com> wrote:

> Another thing is that if zk namespace is used, the namespace needs to be
> create manually using ZK client shell first.
>
> Thanks,
>
> Jun
>
> On Tue, May 29, 2012 at 8:01 AM, Jay Kreps <jay.kreps@gmail.com> wrote:
>
> > There was a question about getting the exception when the consumer
> doesn't
> > have any metadata, which is normal. I was going to document that.
> Anything
> > else I should add?
> >
> > -Jay
> >
>

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