spring-cloud / spring-cloud/spring-cloud-stream
Initialization [stream create for binding from 3rd party bean] attempted repeatedly even when autoCreateStream is false
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 646
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 8
Description
Problem
We are using LogNet/grpc-spring-boot-starter, which is defining the grpcInternalConfigurator Consumer along with spring-cloud-stream.
We are using spring-cloud-stream for creating binding for use with StreamBridge 1. And do not have any functions.
In the absense of spring.cloud.function.definition= property, the consumer defined by lognet is picked up and default binding is created, and repeatedly tries to bind it to while trying to create stream [grpcInternalConfigurator-in-0], while spring.cloud.stream.kinesis.binder.autoCreateStream=false.
This causes an very verbose error message few times every second, which is inundating out cloudwatch log stream, adding to cost.
org.springframework.cloud.stream.provisioning.ProvisioningException: The stream [grpcInternalConfigurator-in-0] was not found and auto creation is disabled.; nested exception is com.amazonaws.services.kinesis.model.ResourceNotFoundException
Solution
- Stream binding (autoconfiguration) on autoscan of beans be limited only at startup.
Alternative considered
None that is acceptable:
- create a stream [grpcInternalConfigurator-in-0]
- define dummy supplier functions and add a stream binding for it.
Additional context
NA
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 by tracing Spring Cloud Stream's autoconfiguration and bean autoscan for the grpcInternalConfigurator consumer, including creation of the grpcInternalConfigurator-in-0 binding. Reproduce the setup with no function definition and autoCreateStream=false, then verify that stream binding is attempted only at startup rather than repeatedly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, grpc, java, spring
- Domain
- backend, stream-processing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100