Uploaded image for project: 'Spring XD'
  1. Spring XD
  2. XD-2201

Exception in a tap will stop the tapped stream from sinking data

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.0 GA
    • Fix Version/s: 1.0.2, 1.1 M1
    • Component/s: Runtime
    • Labels:
    • Story Points:
      5
    • Rank (Obsolete):
      46039

      Description

      Exception in a tap will stop the tapped stream from sinking data.

      Background

      Running xd-singlenode.
      We experienced this when streaming data from a rabbit queue to hdfs. The stream was tapped and we had a groovy processor on the tap stream. Any exceptions in the processor stopped the main stream from writing data to the hdfs sink.

      Steps to reproduce.

      1: Create a groovy script that throws an exception in modules/processor/scripts/exceptionthrower.groovy. Code below

      /**
       * Custom processor to be wired into a tap to throw an exception.
       */
       throw new RuntimeException("Error from processor")
      

      2: Create a sample main stream

      xd:>stream create --name ticktock --definition "time | log" --deploy
      

      3: Tail the log to confirm the data is going to the sink. We see 'sink.ticktock' appearing in the log as expected.
      4: Add a tap to the stream that will throw an exception.

      xd:>stream create --name exTap --definition "tap:stream:ticktock > script --location=exceptionthrower.groovy | log" --deploy
      

      5: Tail the log and we see that there are no more 'sink.ticktock' strings being logged. Looks like the main stream is no longer sending messages to the sink.

        Attachments

          Activity

            People

            • Assignee:
              grussell Gary Russell
              Reporter:
              dokeeffe Derek OKeeffe
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: