github ag2ai/faststream 0.5.48
v0.5.48

latest releases: 0.6.0rc2, 0.6.0rc1, 0.6.0rc0...
one month ago

What's Changed

This release is part of the migration to FastStream 0.6.

In order to provide great features such as observability and more, FastStream requires the inclusion of additional data in your messages. Redis, on the other hand, allows for the sending of any type of data within a message. Therefore, with this release, we introduce FastStream's own binary message format, which supports any data type you wish to use and can include additional information.

For more information on the message format, please see the documentation

By default, we are still using the JSON message format, but as of version 0.6, the default will change to the binary format. Therefore, you can prepare your services for this change by manually setting a new protocol.

For whole broker:

from faststream.redis import RedisBroker, BinaryMessageFormatV1

# JSONMessageFormat using by default, but it will be deprecated in future updates
broker = RedisBroker(message_format=BinaryMessageFormatV1)

Or for a specifica subscriber / publisher

from faststream.redis import RedisBroker, BinaryMessageFormatV1

broker = RedisBroker()

@broker.subscriber(..., message_format=BinaryMessageFormatV1)
@broker.publisher(..., message_format=BinaryMessageFormatV1)
async def handler(msg):
    return msg

Special thanks for @ilya-4real for this great feature!

FastStream require a li

New Contributors

Full Changelog: 0.5.47...0.5.48

Don't miss a new faststream release

NewReleases is sending notifications on new releases.