Spring cloud stream writing in two databases

271 views Asked by At

I have a spring cloud stream situation where I have one source, one transformer and I need to write in two databases the same thing. I was checking if there is an option to have two sinks but I can't find a way to do that. Any suggestion in best practice for my case would be much appreciated!

1

There are 1 answers

2
Gary Russell On

You can have multiple sinks listening to the same destination see consumer groups.

Each group gets a copy of the message.

EDIT

If you are using spring-cloud-dataflow, you can use a tap:

stream create foo --definition="source | transform | sink1"

stream create bar --definition=":fooLtransform > sink2"