Skip to content

docs: document Redis JSON fallback and non-FastStream interop#2906

Merged
Lancetnik merged 1 commit into
mainfrom
docs/redis-json-fallback-interop
Jun 6, 2026
Merged

docs: document Redis JSON fallback and non-FastStream interop#2906
Lancetnik merged 1 commit into
mainfrom
docs/redis-json-fallback-interop

Conversation

@Lancetnik

Copy link
Copy Markdown
Member

Description

Improves the Redis message-format documentation to explain how FastStream interoperates with non-FastStream publishers and subscribers, following the confusion raised in discussion #2899 after JSONMessageFormat / RedisJSONMessageParser was removed in 0.7.0.

What changed in docs/docs/en/redis/message_format.md:

  • New "Interoperability with non-FastStream systems" section documenting that BinaryMessageFormatV1.parse already falls back to a legacy JSON envelope ({"data": ..., "headers": ...}) and then to raw bytes, so no dedicated JSON format is needed.
    • Consuming raw JSON from an external producer — a regular subscriber receives it as a dict with no extra config.
    • Publishing to an external consumer — either let the consumer parse the binary envelope (Go/Java examples), or send raw bytes via broker._connection (the native redis.asyncio.Redis client), with publish/rpush/xadd per destination type.
  • New "Custom message format" section showing how to subclass MessageFormat.
  • Removed stale JSONMessageFormat references from the switching examples and added a warning note about its removal.
  • Updated the outdated "Migration plan" (which still claimed JSON was the current default) to a "Migration history" reflecting the 0.7.x state.

Fixes # (discussion #2899)

Type of change

  • Documentation (typos, code examples, or any documentation updates)

Checklist

  • My code adheres to the style guidelines of this project (just lint shows no errors)
  • I have conducted a self-review of my own code
  • I have made the necessary changes to the documentation
  • My changes do not generate any new warnings
  • I have added tests to validate the effectiveness of my fix or the functionality of my new feature
  • Both new and existing unit tests pass successfully on my local environment by running just test-coverage
  • I have ensured that static analysis tests are passing by running just static-analysis
  • I have included code examples to illustrate the modifications

Clarify that BinaryMessageFormatV1 falls back to raw JSON / plain bytes,
so FastStream can interoperate with non-FastStream publishers and
subscribers without the removed JSONMessageFormat. Fix stale references
to JSONMessageFormat and the outdated "JSON is the default" migration note.

Addresses #2899

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation Redis Issues related to `faststream.redis` module and Redis features labels Jun 5, 2026
@Lancetnik Lancetnik added this pull request to the merge queue Jun 6, 2026
Merged via the queue into main with commit b18a1e6 Jun 6, 2026
31 checks passed
@Lancetnik Lancetnik deleted the docs/redis-json-fallback-interop branch June 6, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation Redis Issues related to `faststream.redis` module and Redis features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants