Open ponponon opened 5 months ago
I found the problem, the problem is with the _as function at https://github.com/celery/kombu/blob/main/kombu/utils/json.py, why introduce this stupid and smartass function?
If you use kombu as the producer and another library (or even another language, such as java) as the consumer, this makes it impossible to deserialise this message body
Can kombu get rid of this boring _as function?
I think that if someone wants to be able to restore the datetime when deserialising, then they should choose pickle instead of changing the datetime of the json into a messy format!
A bug was found in the new version of kombu that serializes datetime type to a dictionary
The cause was that I noticed this strange datetime format in my message queue:
{"created_at": {"__type__": "datetime", "__value__": "2024-01-06T16:14:46.368136"}}
But after I reduced the kombu version from 5.3.2 to 5.2.4, it didn't appear again
示例代码: