Versions Compared

Key

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

...

                 There is no impact. Since we are passing same reference to the headers there is no memory impact.

  • If we are changing behavior how will we phase out the older behavior?

...

  • When will we remove the existing behavior?

               We will keep the existing behavior   Not applicable.

Rejected Alternatives

...

  1.  Producer callback provides a way to link record to its RecordMetaData.

           In this case the context linking  on client side and  depends on client implementation  where as  interceptors having similar RecordMetaData but no access to headers onAcknowledgement(...).


Code Block
languagejava
titleProducer callback
producer.send(message, (RecordMetadata metadata, Exception exception) -> {
                if (metadata!=null && exception == null) {
                
                    String topic = metadata.topic();
                    
                    Iterator<Header> it = message.headers().iterator();

                   .....
                }
            });