Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-11320

Support user callback in Kafka sink

    XMLWordPrintableJSON

Details

    Description

      We would like to get notified when Flink's Kafka sink successfully produces a message to the Kafka cluster for message tracing purposes. The callback should be created for the specific item being produced. Currently this functionality is inside Flink's internal code and not accessible to the user. 

      This change would allow user to get callback when a message is produced in the sink:

      • Add a new interface UserCallbackFactory:
        public interface UserCallbackFactory<IN> {
            Callback create(IN next);
        }
      • Add new constructor in FlinkKafkaProducer to pass in an optional argument of UserCallbackFactory
      • In the  FlinkKafkaProducer.invoke method, create a user callback given the produced item and invoke this callback.

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              allenxwang Allen Wang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m