Project: springxd
Issue XD-2201: Exception in a tap will stop the tapped stream from sinking data
Exception in a tap will stop the tapped stream from sinking data. h2. 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. h2. Steps to reproduce. 1: Create a groovy script that throws an exception in modules/processor/scripts/exceptionthrower.groovy. Code below {code} /** * Custom processor to be wired into a tap to throw an exception. */ throw new RuntimeException("Error from processor") {code} 2: Create a sample main stream {code} xd:>stream create --name ticktock --definition "time | log" --deploy {code} 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. {code} xd:>stream create --name exTap --definition "tap:stream:ticktock > script --location=exceptionthrower.groovy | log" --deploy {code} 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.
Story points: 5