How to interact with a non faststream application with REDIS without json format #2899
-
|
Hello, With v0.7, RedisJSONMessageParser was removed. If you are connected to another python application using Faststream, no issue. What contract can you use then ? Is there any description of the binary contract in order to build it from another language or even python ? Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
|
yeah, looks like 0.7 went binary-first for Redis. I checked current For a non-FastStream producer, either emit that binary layout, or send plain raw bytes if you do not need FastStream headers/metadata; |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the doc: Which BTW doesn't point to the python implementation, need to be found by the user by itself. I'll check later if I have time to find the right link and update that doc. That migration makes no sense to me. Having metrics is a side things... and it would have been more clean to say, we do not provides metrics on JSON format than to remove it.
It doesn't look professional at all... Now, I'm stuck in 0.6.4 until all teams involved in my project find time to synchronously change the message format type. So nice... |
Beta Was this translation helpful? Give feedback.
-
|
JsonFormat was deprecated since 0.5.48 (July 2025 - https://github.com/ag2ai/faststream/releases/tag/0.5.48) and it throws a DeprecationWarning when used. The documentation has examples for writing a BinaryFormat encoder/decoder in two languages - these references should be sufficient to implement an encoder in any language (especially with the use of LLM) To provide some context: the deprecation warning has been in place for almost a year, and the removal in 0.7 was announced in advance. Since version 0.6 (October 2025 - https://github.com/ag2ai/faststream/releases/tag/0.6.0), BinaryFormat became the default behavior, with JsonFormat remaining available as an opt-in for backward compatibility during that transition period. I understand that coordinating format migrations across multiple teams can be challenging - that's exactly why we tried to provide a long transition window. If you have feedback on how the deprecation or migration path could have been communicated more clearly, we'd be happy to hear it. This kind of discussion would have been great to have at the 0.5.48 or 0.6.0 release stages so we could have addressed concerns earlier. |
Beta Was this translation helpful? Give feedback.
-
|
I'm sorry to disapoint you, but a bad idea, even taken long ago, stays a bad idea. I actually never imagined that a lib would deprecate for real something simple and open in favor of a closed complex code. The biggest strengh of faststream was : get an object, give a pydantic model, make that object pass through the system. Now, I have to go to all other service, and ask them to migrate to a binary format nobody has, all at the same time, consumers and producers, in order to use one lib. I will have quite a had time convincing them. All that for no benefit on our side. It brings absolutly no value. |
Beta Was this translation helpful? Give feedback.
-
|
I forgot to mention that moving to 0.7 was in fine very easy due to that "backup" json message format mechanism. I'll move another app soon I hope. |
Beta Was this translation helpful? Give feedback.
And yes, we can fallback to raw JSON. Exactly for compatibility with external not-FastStream systems: