Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Compatibility, Deprecation, and Migration Plan

  • This proposal has no compatibility issues, we just add default method deserialize(String, Headers, ByteBuffer) which is compatible with the existing Deserializerstechnically introduces a semantic change, as application code receiving a ByteBuffer result cannot make any assumptions about position, limit, offset etc any longer. However, no guarantees where ever provided so far, and thus correct user could would still work (user code which does make assumptions about the ByteBuffer is incorrect to begin with, so while it might break, it's a bug at the application layer rather than the ByterBufferDeserializer).

  • If someone wants the deserializer to be compatible with older versions of the kafka-clients library they should always implement the byte array-based deserialize methodsuse ByterArrayDeserializer instead.

Rejected Alternatives

Another solution I thought of is PoolArea, just like Netty, but this solution is more complicated.