Multi module streams configuration

Open
#2,972 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, rabbitmq, spring-boot

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.

Description

enhancement waiting-on-feedback

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.

Dominant language
Java
Stars
1.1k
Forks
646
Avg merge
2d 3h
Merged PRs (30d)
8

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from spring-cloud/spring-cloud-stream

All issues in spring-cloud/spring-cloud-stream

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.