You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Vadim Chekan <ko...@gmail.com> on 2014/08/13 21:06:45 UTC

Protocol specification: who handles partial messages?

>From kafka spec of Fetch API:
"As an optimization the server is allowed to return a partial message at
the end of the message set. Clients should handle this case."

What does "client" mean? Client's application, or kafka's communication
driver?
Also, what "partial message" means? Does it mean, that message can end
before MessageSet.MessageSize indicates? And how is it interpreted the next
message than? Does it starts with leftover of previous one, without header,
and header follows after leftover ends?

Vadim.

-- 
>From RFC 2631: In ASN.1, EXPLICIT tagging is implicit unless IMPLICIT is
explicitly specified

Re: Protocol specification: who handles partial messages?

Posted by Vadim Chekan <ko...@gmail.com>.
Ah, I see. This makes sense now. Just ignore the last trimmed message. I
was afraid that I'd have to do some complex buffer continuation
manipulations.

Thanks a lot for your explanation!
Vadim.


On Wed, Aug 13, 2014 at 1:52 PM, Jun Rao <ju...@gmail.com> wrote:

> Client means client library. Basically, the bytes returned to the consumer
> may not include all the bytes of the last message. The consumer client
> library will figure out the boundary of the last complete message and use
> that info to initiate the next fetch request.
>
> Thanks,
>
> Jun
>
>
> On Wed, Aug 13, 2014 at 12:06 PM, Vadim Chekan <ko...@gmail.com>
> wrote:
>
> > From kafka spec of Fetch API:
> > "As an optimization the server is allowed to return a partial message at
> > the end of the message set. Clients should handle this case."
> >
> > What does "client" mean? Client's application, or kafka's communication
> > driver?
> > Also, what "partial message" means? Does it mean, that message can end
> > before MessageSet.MessageSize indicates? And how is it interpreted the
> next
> > message than? Does it starts with leftover of previous one, without
> header,
> > and header follows after leftover ends?
> >
> > Vadim.
> >
> > --
> > From RFC 2631: In ASN.1, EXPLICIT tagging is implicit unless IMPLICIT is
> > explicitly specified
> >
>



-- 
>From RFC 2631: In ASN.1, EXPLICIT tagging is implicit unless IMPLICIT is
explicitly specified

Re: Protocol specification: who handles partial messages?

Posted by Jun Rao <ju...@gmail.com>.
Client means client library. Basically, the bytes returned to the consumer
may not include all the bytes of the last message. The consumer client
library will figure out the boundary of the last complete message and use
that info to initiate the next fetch request.

Thanks,

Jun


On Wed, Aug 13, 2014 at 12:06 PM, Vadim Chekan <ko...@gmail.com>
wrote:

> From kafka spec of Fetch API:
> "As an optimization the server is allowed to return a partial message at
> the end of the message set. Clients should handle this case."
>
> What does "client" mean? Client's application, or kafka's communication
> driver?
> Also, what "partial message" means? Does it mean, that message can end
> before MessageSet.MessageSize indicates? And how is it interpreted the next
> message than? Does it starts with leftover of previous one, without header,
> and header follows after leftover ends?
>
> Vadim.
>
> --
> From RFC 2631: In ASN.1, EXPLICIT tagging is implicit unless IMPLICIT is
> explicitly specified
>