You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by "Honda Wei ( 魏宏達 )" <Ho...@taiwanmobile.com> on 2015/02/03 08:53:58 UTC

Why the consumer can't receve the message if fetch_size=1

Hi Kafka Team

I write some simple program and find a strange issue.
Why the consumer can’t receive the message if the fetch is set to 1 , but when the parameter set to 100.
The consumer will receive the message normally.

FetchRequest req = new FetchRequestBuilder()
        .clientId(clientName)
        .addFetch(a_topic, a_partition, readOffset, 100)
        .build();



Thanks~

Best Regards

________________________________
_DISCLAIMER : This message (and any attachments) may contain information that is confidential, proprietary, privileged or otherwise protected by law. The message is intended solely for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this message in error, please destroy the message or delete it from your system immediately and notify the sender.

Re: Why the consumer can't receve the message if fetch_size=1

Posted by Yury Ruchin <yu...@gmail.com>.
The fetch request size should not be less than the maximum message size.
Apparently, all your messages are larger than 1 byte, so when you set fetch
size to 1, your consumer is unable to fetch anything.

2015-02-03 10:53 GMT+03:00 Honda Wei ( 魏宏達 ) <Ho...@taiwanmobile.com>:

> Hi Kafka Team
>
> I write some simple program and find a strange issue.
> Why the consumer can’t receive the message if the fetch is set to 1 , but
> when the parameter set to 100.
> The consumer will receive the message normally.
>
> FetchRequest req = new FetchRequestBuilder()
>         .clientId(clientName)
>         .addFetch(a_topic, a_partition, readOffset, 100)
>         .build();
>
>
>
> Thanks~
>
> Best Regards
>
> ________________________________
> _DISCLAIMER : This message (and any attachments) may contain information
> that is confidential, proprietary, privileged or otherwise protected by
> law. The message is intended solely for the named addressee (or a person
> responsible for delivering it to the addressee). If you are not the
> intended recipient of this message, you are not authorized to read, print,
> retain, copy or disseminate this message or any part of it. If you have
> received this message in error, please destroy the message or delete it
> from your system immediately and notify the sender.
>