Project: springxd
Issue XD-641: Problem with tapping and > (source channels)
This is a follow on from XD-592. In that bug we fixed up the ability to use tap with pipe. Tap when used as a source channel should also work (and should deploy in a more optimized fashion since source channels can be directly connected to the subsequent module, creation of a pass-through tap instance isn't necessary). This test shows the syntax that should work and the current information about how it fails: {code} public void testTapSourceChannel() throws IOException { FileSink sink1 = newFileSink(); FileSink sink2 = newFileSink(); stream().create("myhttp", "http --port=9314 | transform --expression=payload.toUpperCase() | filter --expression=true > :foo"); // fails with: java.lang.IllegalArgumentException: bean 'myhttp.1' is already // registered but does not match the required type tap().create("wiretap1", "tap myhttp.transform > transform --expression=payload.replaceAll('a','.') | %s", sink1); // fails in TapDefinition ctor with: java.lang.IllegalArgumentException: // streamName cannot be empty or null tap().create("wiretap2", "tap :foo > transform --expression=payload.replaceAll('a','.') | %s", sink2); httpPostData("http://localhost:9314", "Dracarys!"); } {code} I suspect part of the problem initially lies with the code around EnhancedStreamParser that builds the module deployment requests from the Ast parsed from the input DSL string. Whether a source channel was originally specified with 'tap' is captured in that Ast but that knowledge doesn't appear to be getting used.
Story points: 4