Reputation: 2304
I use kafka and spring cloud stream in functional programing model. I want to use the reactive api
So I have a Function bean that takes Flux and return flux The returned flux is created in separate class
Do I need to subscribe to activate the new/return flux?
Upvotes: 0
Views: 226
Reputation: 6126
That will not work if I understand you correctly. The expectation for "streaming cases" is that your function adds operations to the incoming flux and returns it. The framework will subscribe to what your function has returned and the stream begins. Because of that if you create a new instance of Flux it would not work. What I mean it is by design. Once we have truly reactive binders (which we don't at the moment)then things will change.
Upvotes: 0