spring-cloud / spring-cloud/spring-cloud-stream
Multi module streams configuration
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 646
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 8
Description
Hello,
I'm not sure this should be considered a bug, it's more a how-to question.
I have a multi module project, consisting of multiple gradle modules where every module create different consumers and producers using a RabbitMQ broker binding. The consumer functions, bindings and binders are defined in the global application.yaml file.
In an attempt of structure better the project, I've split the config in separate application.yaml files, one under each module resources', only containing the needed module related configuration.
When there are multiple application.yaml files, these are combined and, since "spring.cloud.stream.function.definition" is a string, it get's overwritten by the different application.yaml files, therefore making impossible to split the configuration files in the project.
Digging a little bit in this repo, I've seen the defintions are obtained and split here, and I was wondering if it could be possible to have the definitions declared as an array in the config, so it can be extended when having multiple yaml configuration files. In my projects I've used @ConfigurationProperties for this and it's something I believe it could help here.
I would be more than happy to help with a PR for this but I need some guidance, this would be the first open source project I collaborate with and I'm pretty sure I'm missing something.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/function/FunctionConfiguration.java around line 1010 and review how function definitions are obtained and split. Then trace how multiple application.yaml files are combined; done should mean module-level definitions can be combined without one configuration overwriting another, with the approach confirmed by maintainers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, rabbitmq, spring-boot
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100