spring-cloud / spring-cloud/spring-cloud-stream
Be able to discard messages using the Function Router
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 646
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 8
Description
Consider the following scenario:

Here there is a single destination where all applications in a system publish their messages, let's call that destination all-messages.
Our application might want to consume message of type B and C, but not A.
Currently we can setup a function router that can dispatch message of type B and C to their own respective consumers, but there isn't a way right now for the router to effectively discard a message.
The same functionality could also be used to discard messages produced against a shared channel.
Let's say we have the same setup and our application is now not only able to consume but also to contribute back with its own messages.
Let's say the application wants to produce a message of type D into all-messages, to allow other applications to consume it. This will also trigger again the function router unfortunately, as after it's published it will be seen as a new incoming message to be potentially consumed.
Having a /dev/null destination could help solving these issues.
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 Function Router scenario described in the issue and trace how messages published to the shared all-messages destination are routed. Done should allow the router to intentionally discard selected messages, including messages published back to that shared destination; the payload names no source files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- 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