Expand description
Celery Protocol v2/v5 implementation
This crate provides the core protocol definitions for Celery message format, ensuring compatibility with Python Celery workers.
§Protocol Compatibility
- Celery Protocol v2 (Celery 4.x+)
- Celery Protocol v5 (Celery 5.x+)
§Message Format
Messages consist of:
- Headers: Task metadata (task name, ID, parent/root IDs, etc.)
- Properties: AMQP properties (
correlation_id,reply_to,delivery_mode) - Body: Serialized task arguments
- Content-Type: Serialization format (“application/json”, “application/x-msgpack”)
- Content-Encoding: Encoding format (“utf-8”, “binary”)
§Modules
compat- Python Celery compatibility verificationserializer- Pluggable serialization frameworkresult- Task result message formatevent- Celery event message formatcompression- Message body compressionembed- Embedded body format (args, kwargs, embed)negotiation- Protocol version negotiationsecurity- Security utilities and content-type whitelistbuilder- Fluent message builder APIauth- Message authentication and signing (HMAC)crypto- Message encryption (AES-256-GCM)extensions- Message extensions and utility helpersmigration- Protocol version migration helpersmiddleware- Message transformation middlewarezerocopy- Zero-copy deserialization for performancelazy- Lazy deserialization for large messagespool- Message pooling for memory efficiencyextension_api- Custom protocol extensions APIutils- Message utility helpersbatch- Batch message processing utilitiesrouting- Message routing helpersretry- Retry strategy utilitiesdedup- Message deduplication utilitiespriority_queue- Priority-based message queuesworkflow- Workflow and task chain utilities
Modules§
- auth
- Message authentication and signing
- batch
- Batch message processing utilities
- builder
- Fluent message builder API
- compat
- Python Celery Protocol Compatibility Tests
- compression
- Compression support for message bodies
- crypto
- Message encryption and decryption
- dedup
- Message deduplication utilities
- embed
- Celery embedded body format
- event
- Celery event message format
- extension_
api - Custom protocol extensions API
- extensions
- Message extensions and utilities
- lazy
- Lazy deserialization for improved performance
- middleware
- Message transformation middleware
- migration
- Protocol version migration helpers
- negotiation
- Protocol version negotiation and detection
- pool
- Message pooling for memory efficiency
- priority_
queue - Priority queue for message processing
- result
- Task result message format
- retry
- Retry strategy utilities
- routing
- Message routing helpers
- security
- Security utilities for protocol handling
- serializer
- Pluggable serialization framework
- utils
- Message utility helpers
- workflow
- Workflow and task chain utilities
- zerocopy
- Zero-copy deserialization for performance optimization
Structs§
- Message
- Complete Celery message
- Message
Headers - Message headers (Celery protocol)
- Message
Properties - Message properties (AMQP-like)
- Task
Args - Task arguments (args, kwargs)
Enums§
- Content
Encoding - Content encoding
- Content
Type - Content type for serialization
- Protocol
Version - Protocol version
- Validation
Error - Validation errors for Celery protocol messages