spring-cloud / spring-cloud/spring-cloud-stream

No possibility to create function definition templates

Open
#2,406 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the issue
We have a dynamic amount of functions that should use the same function definition within the same application. We need to define the function definition once and reuse it from the configuration for different tenants or topics.

To Reproduce

  1. Create a function definition: myfunctiondefinition
  2. set spring.cloud.function.definition: myfunctiondefinition1,myfunctiondefinition2
  3. map myfunctiondefinition1 and myfunctiondefinition2 to myfunctiondefintion

Spring Cloud Stream 3.2.2

The issue has been raised on stackoverflow and we gave a proposal on how to handle it from within the own code. Nevertheless the current approach of Spring Cloud Streams on how to identify function definition candidates makes the code quite ugly. A native possibility for this type of templating would be much appreciated: https://stackoverflow.com/questions/72228350/can-i-use-a-spring-cloud-stream-function-definition-for-multiple-tenants-kafka

Thanks and keep up the good work!

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.

Research direction

Start by reviewing how the spring.cloud.function.definition property identifies function definitions in Spring Cloud Stream, then read the linked Stack Overflow proposal for the tenant and topic use case. Done means a function definition can be declared once and reused as a template for multiple configured functions, with the behavior covered by relevant tests.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.