kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay Kreps <jay.kr...@gmail.com>
Subject error code in ByteBufferMessageSet
Date Fri, 30 Mar 2012 21:17:27 GMT
There are a number of methods on ByteBufferMessageSet:
  def getInitialOffset = initialOffset
  def getBuffer = buffer
  def getErrorCode = errorCode
  def getSerialized(): ByteBuffer = buffer

We don't generally have getters in kafka, since it automatically adds
them. Is there a reason for these?

Also, there is no documentation on getSerialized() which does the same
thing as getBuffer().

Also why does a message set have an initial offset? Isn't it the case
that a messageset is independent of a particular offset to which it
might be written?

It isn't clear to me why a MessageSet would have an error code at all.
It is a set of messages, that is what it is. Error codes are something
that have to do with APIs...did we just stick that in for convenience?

I have a feeling that some of this was stuck in due to not having a
proper consumer response object in which to put the fields maybe. Now
that we have that in 0.8 can we clean this up? I feel if we junk up
these core classes we will soon have a real mess on our hands...


View raw message