-
Notifications
You must be signed in to change notification settings - Fork 639
Closed
Labels
Description
We have been analyzing this spring-cloud/spring-cloud-stream#1790, and we see a clear backward step in functionality with FunctionRouter versus the filter conditions in @StreamListener.
These are the limitations we found with the FunctionRouter:
- Only one
FunctionRoutercan be defined per application. - The
FunctionRoutercan only belong to one Binder: for example, and although it is rare, if your application consumes Rabbit and Kafka, theFunctionRouterhas to be configured with one of the binders, it will never be able to read two different data sources. - The
FunctionRouterdoes not know the origin of the message consumed and therefore, even if it consumes from several topics, you can not customize arouting-expressiondepending on the origin of the message.
For all this, we see that the FunctionRouter is another functionality totally different from the filtering in the @StreamListener, which is a significant loss in terms of usability in Spring Cloud Stream with the functional approach.
We believe it would be important to reconsider this functionality and add at least some of the following features to the FunctionRouter:
- Being able to define more than one
FunctionRouterper application. - To be able to define one
routing-expressionper message origin. For example, if theFunctionRouterhas configured topic1 and topic2 destinations, it would be nice to be able to define onerouting-expressionfor topic1 messages and anotherrouting-expressionfor topic2 messages.
Thank you very much, we hope that the request will be considered.
juliojgd, JordiMartinezVicent, JoseLora, diegopatinor and evelynchua5772