Versions Compared

Key

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

...

  • Adds the ability for producers to set standard header key=value value pairs
  • No incompatible client api change (only new methods)
  • Allows users to specify the serialisation of the header value per header
  • Compact key space
  • Provides a standardised interface to eco systems of tools that then can grow around the feature

The disadvantage of this proposal is:

  • Change to the message object

Create a Headers Interface and Implementation to encapsulate headers protocol.

This lazy initialises/deserialises, on first method access.

  • Fields:
    • MultiMap<String, byte[]> headers
  • Constructors
    • ()
    • (bytes[] headerBytes)
  • Methods
    • Collection<byte[]> get(String key)
    • void add(String key, byte[] value)
    • Collection<String> keys()
    • byte[] asBytes()

Add a headers field Headers to both ProducerRecord and ConsumerRecord

  • Accessor methods of Headers getHeaders() added to interface of the ProducerRecord/ConsumerRecord.

...