Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter Messages by Header Before Deserialization #1705

Open
amine-abdelli opened this issue Jul 15, 2024 · 1 comment
Open

Filter Messages by Header Before Deserialization #1705

amine-abdelli opened this issue Jul 15, 2024 · 1 comment

Comments

@amine-abdelli
Copy link

amine-abdelli commented Jul 15, 2024

Describe the solution you'd like

Hello KafkaJS team,

I hope this message finds you well. I would like to suggest a feature enhancement for KafkaJS that would be highly beneficial for our use case and potentially for many others.

Current Behavior:
As it stands, KafkaJS does not support filtering messages by header before deserializing the value and key. This means that by default, all messages are deserialized, and any filtering based on headers is performed post-deserialization within the application.

Problem Statement:
This current behavior poses performance and efficiency challenges. For applications with a high volume of messages, unnecessary deserialization of messages that do not meet the header criteria can lead to significant overhead and resource consumption.

Proposed Feature:
We propose adding the capability to filter messages by header before the deserialization process. This would allow users to specify header filters that KafkaJS could apply before deserializing the message value and key. By doing so, only messages that match the specified header criteria would be deserialized and processed by the application.

Thank you for considering this feature request. We are happy to provide further details or assist in any way to help implement this feature.

Best regards,

Amine

@patrykwegrzyn
Copy link
Contributor

As far i can tell the current behaviour is:
KafkaJS delivers messages as raw buffers to the consumer without imposing any structure(serde) for both key and value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants