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

Be able to discard messages using the Function Router

Open
#2,278 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

Consider the following scenario:

Screenshot 2022-02-08 at 11 02 20

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

  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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.