0

I have a stream, wherein there is a source->processor1->processor2->Sink1

I need to push the output of processor1 to another Sink instance (i.e. Sink2).

I need something like

                      ______Processor2-----Sink1
                     |
Source-->Processor1--
                     |______Sink2

can we bind processor1 output to processor2 and Sink2

I tried binding to multiple exchanges by giving multiple names separated by ; but did not work.

spring:
  cloud:
    stream:
      function:
        bindings:
          processor1-in-0: srcchannel
          processor1-out-0: proc2channel; sink2channel 
      default-binder: rabbit

Venu Gopal
  • 15
  • 1
  • 7

1 Answers1

0

With data flow, you can define 3 streams; the first ending with processor1 with a named output destination.

Then define two more streams to consume from that named destination.

See https://dataflow.spring.io/docs/feature-guides/streams/named-destinations/

Gary Russell
  • 166,535
  • 14
  • 146
  • 179
  • Thank you... I will try that. I have another issue in processor2. processor2 should send either to Sink1 or to Sink3 based on a condition. Will you please throw some light on this as well – Venu Gopal Nov 04 '22 at 05:34
  • I could achieve parallel streams with named output destination. Thank you Gary Russel – Venu Gopal Nov 07 '22 at 05:28