Project: talendesb
Issue TESB-12039: Support JAX-RS StreamingOutput for tRESTResponse
JAX-RS StreamingOutput allows for streaming the response data by chunks, for example, the pseudo-code: {code:java} class StreamingOutputImpl implements StreamingOutput { public void write(OutputStream output) throws IOException, WebApplicationException { String someRecord = getNextRecord(); output(someRecord.getBytes()); } } @Path("/") public class RestService { @GET public StreamingOutput getBigDataRecords() { return new StreamingOutputImpl(); } } {code} For example, if an advanced tRESTResponse "support streaming" property is enabled then tRESTResponse will return StreamingOutputImpl which will be iterating over all the available pieces of the data, example, those returned from tNetezzaInput, and output them one by one into OutputStream, converting the data to byte[] if needed, depending on the data type. If this will work then it can prove to be a very effective way of streaming back the large volumes of data.
Story points: 2