Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-2789

Kafka sink sends messages to the source topic by mistake

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.6.0
    • None
    • Sinks+Sources
    • None
    • Flume 1.6

    Description

      In my scenario, I need to send messages from a kafka source to a kafka sink , in other workds, transfering messages from a topic A to another topic B.
      As a result, I find my kafka sink always sends messages back to topic A.

      The reason in the codes is:
      KafkaSink.java:
      ****************************************************************************************
      107 if ((eventTopic = headers.get(TOPIC_HDR)) == null)

      { 108 eventTopic = topic; 109 }

      ****************************************************************************************

      If the source is a Kafka source, eventTopic won't be null because it is the source topic from the msg header. Therefore, the kafka sink will send the message to its source topic by mistake.

      Attachments

        1. FLUME-2789-1.patch
          10 kB
          Li Ye
        2. FLUME-2789-2.patch
          5 kB
          Li Ye

        Issue Links

          Activity

            People

              Unassigned Unassigned
              qdutj Alex Tian
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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