-
-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem?
Currently, many asynchronous Python projects are moving away from Pydantic in favor of msgspec due to its superior performance in serialization and validation. While taskiq is flexible, the documentation and default examples heavily lean towards Pydantic.
I would like to clarify the current state of msgspec support and suggest making it a first-class citizen in the taskiq ecosystem.
Describe the solution you'd like
- Compatibility: Are there any known architectural constraints that prevent using
msgspec.Structfor task arguments and result schemas instead of Pydantic models? - Encoders: Is there a recommended way to implement a custom
TaskiqEncoderusingmsgspecto ensure minimal overhead during task serialization? - Validation: Does the library plan to provide a built-in
MsgspecBrokeror similar integration to bypass Pydantic's validation logic entirely?
Describe alternatives you've considered
It would be great to have:
- An official
taskiq-msgspecpackage or a dedicated encoder implementation. - Documentation/examples showing how to define tasks using
msgspec.Structwithout triggering Pydantic-based validation under the hood. - Benchmarks or a "performance-first" guide for users who prioritize speed and low memory footprint.
Additional context
For high-load backend systems, reducing the serialization overhead is critical. msgspec is often 10-80x faster than Pydantic, and having it as a seamless alternative would make taskiq the go-to choice for performance-critical distributed tasks.
Which component would this affect?
Other
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request