Comments (5)
What I find unintuitive is not having generic (de)serializers and having to provide type resolvers for things that deserializer could do.
For example, if we have a generic deserializer and provide type for it at registration through generic parameter then the ability of the serializer to deserialize the message to that type is already acting as a type resolver, this is the case both with Json and XML.
And doing that we already get the instance of the message content in the correct strong type.
My use case is such that I need custom type resolvers - because incoming messages lack the Message-Type header and the default type resolver won't resolve. So I have to run custom resolvers on all messages and the way I resolve type is by deserializing the raw content. If it fails, it is not the correct type, move on.
Hopefully someone will understand my use case.
from kafkaflow.
Hi @mhkolk ,
We think this is a pertinent improvement to be made, but we'll need some time to analyze how to implement such changes.
from kafkaflow.
Hi,
Analyzing your issue, there is no need to register the deserializer for each type, so you can just use the AddSerializer<>()
, with the two needed handlers. If the messages aren't being produced by KafkaFlow, and the message type is not defined in headers, you can register an IMessageTypeResolver
, to get the message type, and use AddSerializer<JsonMessageSerializer, YourTypeResolver>()
. Please let us know if this works for you.
from kafkaflow.
Hi @mhkolk ,
If you're still experiencing this issue or have any additional information to share, please feel free to let us know.
However, if we don't receive any updates or feedback from you within the next 5 business days, we may need to consider closing this issue. Please understand that this is not a final decision, and you can always reopen the issue or create a new one in the future.
We appreciate your contribution to our project and look forward to hearing from you soon. If you have any questions or need further assistance, don't hesitate to reach out.
from kafkaflow.
Hi @mhkolk,
We will be closing this issue since the question has been answered. Please feel free to respond to this message or reopen the issue if you'd like to continue the discussion or if you've encountered any new developments related to it.
Thank you for your contribution.
from kafkaflow.
Related Issues (20)
- [Feature Request]: Add extensibility to OpenTelemetry tracing HOT 1
- Improve Worker Distribution Strategy documentation
- [Bug Report]: KafkaFlow OTEL trace is breaking after message consumption
- [Feature Request]: Analyze and adapt to OTEL Semantic Conventions version 1.23.0
- [Bug Report]: KafkaBus.StopAsync() blocks and does not return if there are messages still pending to be consumed HOT 3
- [Bug Report]: System.InvalidOperationException: There is no offsets in the received queue. Call Enqueue first HOT 1
- [Bug Report]: Distribution strategy by message/partition key issue. HOT 4
- [Bug Report]: Consumer Stuck on Exceeding Max Poll Interval
- [Bug Report]: Deserializer does not trigger next middleware in pipeline HOT 2
- [Feature Request]: Add AvroConvert schema registry serializer
- [Bug Report]: System.InvalidOperationException: Could not load the embedded file manifest 'Microsoft.Extensions.FileProviders.Embedded.Manifest.xml' for assembly 'KafkaFlow.Admin.Dashboard'.
- [Bug Report]: WebApi Sample not working as expected
- [Bug Report]: Incompatibility with Microsoft.IO.RecyclableMemoryStream 3.0.0 HOT 1
- [Feature Request]: Inheritance support in Typed Handler Middleware HOT 1
- [Feature Request]: Support JsonSerializerContext ie. JSON source generator HOT 1
- [Bug Report]:Unable to produce tombstone records HOT 7
- Manipulating headers HOT 7
- [Bug Report]: schema-registry service fails because broker is not available yet HOT 1
- [Feature Request]: Schema Registry Samples is Missing an Avro Generic Example HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kafkaflow.