spring-cloud / spring-cloud/spring-cloud-stream
StreamBridge unable to send message due to missing TARGET_PROTOCOL field
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 646
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 8
Description
In Spring Pulsar we have a failing SCSt Pulsar binder integration test which seems to be caused by StreamBridge (spring-cloud-stream 5.0.0-SNAPSHOT) referencing MessageUtils.TARGET_PROTOCOL (from spring-cloud-function-context-5.0.0-SNAPSHOT) which has been removed.
Steps to reproduce
With Spring Cloud Stream 5.0.0-SNAPSHOT making the following call:
streamBridge.send("mySupplier-out-0", "myMessage");
will result in the following exception:
Caused by: java.lang.IllegalStateException: java.lang.NoSuchFieldError: TARGET_PROTOCOL
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:808)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$2(SpringBootContextLoader.java:144)
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58)
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46)
at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1444)
at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:563)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:144)
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 with the StreamBridge.send("mySupplier-out-0", "myMessage") call in SpringPulsarBinderSampleApp.java and reproduce the NoSuchFieldError using Spring Cloud Stream 5.0.0-SNAPSHOT. Trace the TARGET_PROTOCOL reference and verify the Spring Cloud Function and Stream dependencies are compatible; done means the sample integration test sends the message without this exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- backend, stream-processing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100