title: Spring dataflow Processor to process one payload and write multiple rows in data table
body: <p>I would like to ask a simple question, </p>
  
  <p>I have implemented a processor, which process one payload and return an array of entities, such like:</p>
  
  <pre><code>@EnableBinding(Processor.class)
  public class SimpleProcessor {
      ...
      public SimpleProcessor () {
          ...
      }
  
      @Transformer(inputChannel = Processor.INPUT, outputChannel = Processor.OUTPUT)
              public OutgoingEntity[] processData(IncomingEntity payload) {
  
      // business logic here
  
      return outgoingEntity; 
  }
  </code></pre>
  
  <p>I have my stream in SCDF and middleware as kafka like this: </p>
  
  <pre><code>some source | SimpleProcessor | JDBC sink
  </code></pre>
  
  <p>to validate the messages, I have replaced log sink to relpace JDBC sink and it logs arrays of json. When I use JDBC sink, it throws Exception and says JDBC sink can not access the properties in the object, which makes sense, that it is array of objects instead object...</p>
  
  <p>My question is:</p>
  
  <ol>
  <li><p>Can I use modify my processor, so it can process a payload once and give out message multiple time, like this,</p>
  
  <pre><code>@Transformer(inputChannel = Processor.INPUT)
  public void processData(IncomingEntity payload) {
      ...
      for(OutGoingEntity o: OutgoingEntity[]){ 
          outputMethode();
      }
  }
  
  @Transformer(outputChannel = Processor.OUTPUT)
  private OutGoingEntity outputMethode() {
      .....
      return outGoingEntity; 
  }
  </code></pre>
  
  <p>So it can pass multiple json object to jdbc sink and write in the datatable.</p></li>
  <li><p>Can I use JDBC sink to deal with arrays? How?</p></li>
  <li><p>Can I use some other processors or sink to finish this task?</p></li>
  </ol>