Uploaded image for project: 'Apache Gobblin'
  1. Apache Gobblin
  2. GOBBLIN-684

Ensure buffered messages are flushed before close() in KafkaProducerPusher

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.15.0
    • 0.15.0
    • gobblin-metrics
    • None

    Description

      Currently, when KafkaProducerPusher is closed, it invokes KafkaProducer#close(). However,close() only guarantees delivery of in-flight messages, not the messages in the producer buffer waiting to be sent out. This results in data loss.

      The fix ensures that we call flush() before close(). As a result, any buffered messages are immediately pushed out and we block until the messages are acked. 

       

      Attachments

        Issue Links

          Activity

            People

              sv2000 Sudarshan Vasudevan
              sv2000 Sudarshan Vasudevan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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