Skip to content

Can Spring Kafka Base on record header which consume from Src Kafka then distribute message to different target kafka cluster #2021

@xzhan

Description

@xzhan

Hi @garyrussell I read you reply on this thread https://stackoverflow.com/questions/53843328/filter-messages-before-deserialization-based-on-headers

here is my project problem

We have upstream Kafka clusters build on AWS region, which generate message with record heard ().

We have down stream Kafka clusters build on our Internal clusters.

Now we want to build on one smart routing service which consumer message from upstream Kafka then routing (produce) message to target Kafka cluster only.

take example : Upstream Kafka generate two message

one message with record header , key: DC value: SJC
second message with record header , key DC value: DFW

our smart routing service consumer two message then base on header to send message to down stream Kafka one by one , one go to down stream service SJC , another send to down stream service DFW

so base on that can spring kafka support that ? can you guide me how to design well on this case , especially how to write code more flexible with different record header rule

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions