4

I wish to define a process such as "do operation A and then execute both B and C on the output payload of A":

       +- [B]
[A] -> |
       +- [C]

I really do not need to aggregate after [B] and [C] execute.

Which is correct?

  1. Terminate [A] with .publish("mychannel") and define [B] and [C] integrationFlows @Bean with IntegrationFlows.from("mychannel")...get()

  2. Terminate [A] with .publishSubscribeChannel(...)

DaniloV
  • 25
  • 1
  • 1
  • 6
lrkwz
  • 6,105
  • 3
  • 36
  • 59

1 Answers1

4

I'd say that the best design for you must look like the XML config:

@Bean
IntegrationFlow flowA() {
   return IntegrationFlow.from(...)
                      .channel("publishSubscribeChannel")
                      .get();
}

@Bean 
MessageChannel publishSubscribeChannel() {
   return new PublishSubscribeChannel();
}

@Bean
IntegrationFlow flowB() {
   return IntegrationFlow.from("publishSubscribeChannel")
           ...
}

@Bean
IntegrationFlow flowC() {
   return IntegrationFlow.from("publishSubscribeChannel")
           ...
}

Just because you are newbie here and don't feel good with many features here yet.

P.S. Please, respect our time to allow us do our own work and maybe help other people. We aren't intended to do work for you - it is out of our responsibility. The questions "how does it work?" or "Seems for me it is a bug" are good candidates to discuss. But similar about "what is your opinion about my design?" (or like that your JIRA for complex sample) isn't so useful for the community. Sorry.

Artem Bilan
  • 113,505
  • 11
  • 91
  • 118
  • 1
    Oops sorry I'll do my best to respect your time. regarding the jira i submitted I was only following @gary-russell 's suggestion here http://stackoverflow.com/questions/31156737/moving-processed-files-in-remote-sftp-using-java-dsl?noredirect=1#comment51577819_31156737 – lrkwz Aug 06 '15 at 14:07