airtai / faststream

FastStream is a powerful and easy-to-use Python framework for building asynchronous services interacting with event streams such as Apache Kafka, RabbitMQ, NATS and Redis.
https://faststream.airt.ai/latest/
Apache License 2.0
2.52k stars 128 forks source link

Provide the option to disable data validation #444

Closed danielgafni closed 1 year ago

danielgafni commented 1 year ago

Data validation is sometimes not desirable due to negative performance impact

It would be useful if fastkafka provided a way to disable it using using model_construct.

sternakt commented 1 year ago

This could be solved by writing a custom encoder/decoder that uses model_construct, please checkout Creating a custom encoder/decoder guide and see if this will fit your use-case