Releases: airtai/faststream
v0.5.37
What's Changed
- fix: correct Confluent options name mapping by @Lancetnik in #2137
- fix: correct call_decorators wrapping order by @Lancetnik in #2138
Full Changelog: 0.5.36...0.5.37
v0.5.36
What's Changed
- fix #2088: respect parsed sasl_mechanism by @Lancetnik in #2092
- Add delay to unassigned consumer warning by @Arseniy-Popov in #2090
- fix: resolve forward refs in FastAPI integration by @Lancetnik in #2096
- fix: unwrap handler function when getting dependant by @Yakov-Varnaev in #2093
- fix: make
CriticalLogMiddleware
respect broker log level (#2130) by @fadedDexofan in #2131 - Fixed nested dataclasses schema generation by @NelsonNotes in #2097
- refactoring ConfluentConfig by @diskream in #2098
- refactored subscription Annotation Serialization by @MaximGit1 in #2112
- docs: added pros and cons to publishers page by @0xWEBMILK in #2103
- docs: follow off logging recommendations by @guitvcer in #2127
- docs: add example for probes by @Sehat1137 in #2108
- docs: fix footer after gurubase intagration by @Rusich90 in #2120
- docs: Toggle Gurubase widget theme by @bshelkhonov in #2117
- docs(#2109): Inlines the include files directly into the location where it is used(faststream.md, scheduling.md) by @MaestroXXXVIII in #2113
- docs(#2109): "getting-started/subscription" section has been updated by @MaximGit1 in #2114
- docs(#2109): make PR reference by @Lancetnik in #2111
- docs(#2109): inline includes getting-started/lifespan by @Sabfo in #2115
- docs(#2109): inline includes getting-started/dependencies by @Sabfo in #2116
- docs(#2109): inline includes getting-started/serialization/decoder.md by @s-v-y-a-t in #2118
- docs(#2109): deleted include code in getting_started/index by @RenameMe1 in #2119
- docs(#2109): Docs/include inline by @close2code-palm in #2123
- docs(#2109): deleted include code in getting_started/opentelemetry by @RenameMe1 in #2125
- docs(#2109): deleted include code in getting_started/prometheus by @RenameMe1 in #2124
- docs(#2109): inline includes getting-started/integrations by @TurtleOld in #2121
- docs(#2109): remove docs includes context, serialization, publishing by @TurtleOld in #2126
New Contributors
- @NelsonNotes made their first contribution in #2097
- @diskream made their first contribution in #2098
- @MaximGit1 made their first contribution in #2112
- @MaestroXXXVIII made their first contribution in #2113
- @Sabfo made their first contribution in #2115
- @s-v-y-a-t made their first contribution in #2118
- @bshelkhonov made their first contribution in #2117
- @RenameMe1 made their first contribution in #2119
- @close2code-palm made their first contribution in #2123
- @TurtleOld made their first contribution in #2121
- @guitvcer made their first contribution in #2127
- @fadedDexofan made their first contribution in #2131
Full Changelog: 0.5.35...0.5.36
v0.5.35
What's Changed
- Add concurrent-between-partitions kafka subscriber by @Arseniy-Popov in #2017
- chore: make uv sync working by @Lancetnik in #2041
- docs: add Ask AI button with Gurubase widget by @Lancetnik in #2042
- docs: create FastStream image shield by @Lancetnik in #2062
- Close #2060 by @Flosckow in #2063
- feat: allow broker setting in on_startup hook by @Yakov-Varnaev in #2073
- ImportError raises change by @0xWEBMILK in #2080
- docs: Fix distributed spelling error in task scheduling page by @Sandldan in #2081
- Exclude confluent-kafka 2.8.1 by @Yakov-Varnaev in #2084
New Contributors
- @Arseniy-Popov made their first contribution in #2017
- @Yakov-Varnaev made their first contribution in #2073
- @0xWEBMILK made their first contribution in #2080
- @Sandldan made their first contribution in #2081
Full Changelog: 0.5.34...0.5.35
v0.5.34
What's Changed
- fix: when / present in virtual host name and passing as uri by @pepellsd in #1979
- fix (#2013): allow to create publisher in already connected broker by @Lancetnik in #2024
- feat: add BatchBufferOverflowException by @spataphore1337 in #1990
- feat: add static instrumentation info by @draincoder in #1996
- docs: remove reference of "faststream.access" by @rishabhc32 in #1995
- docs: fixed typo in publishing/test.md by @AlexPetul in #2009
- docs: ability to declare queue/exchange binding by @MagicAbdel in #2011
- docs: fix spelling mistake of
/health
by @herotomg in #2023 - docs: update aio-pika external docs URL as it has been moved by @HybridBit in #1984
- refactor: add type annotations for RabbitQueue and enum for queue type by @pepellsd in #2002
New Contributors
- @HybridBit made their first contribution in #1984
- @rishabhc32 made their first contribution in #1995
- @AlexPetul made their first contribution in #2009
- @MagicAbdel made their first contribution in #2011
- @herotomg made their first contribution in #2023
Full Changelog: 0.5.33...0.5.34
v0.5.33
What's Changed
Just a Confluent & Kafka hotfix. Messages without body (with key only) parsing correctly now.
- fix: Confluent, read messages under lock by @Lancetnik in #1963
- fix #1967: correct empty kafka message body processing by @Lancetnik in #1968
Full Changelog: 0.5.32...0.5.33
v0.5.32
What's Changed
Thanks to @Flosckow one more time for a new release! Now you have an ability to consume Confluent messages (in autocommit mode) concurrently!
from faststream.confluent import KafkaBroker
broker = KafkaBroker()
@broker.subscriber("topic", max_workers=10)
async def handler():
"""Using `max_workers` option you can process up to 10 messages by one subscriber concurrently"""
Also, thanks to @Sehat1137 for his ASGI CLI support bugfixes
- fix #1959: propagate logger to Confluent by @Lancetnik in #1960
- Concurrent confluent kafka by @Flosckow in #1961
- fix: extend validation for --factory param by @Sehat1137 in #1964
- fix: support only uvicorn ASGI Runner by @Sehat1137 in #1965
Full Changelog: 0.5.31...0.5.32
v0.5.31
What's Changed
Well, you (community) made a new breathtaken release for us!
Thanks to all of this release contributors.
Special thanks to @Flosckow . He promotes a new perfect feature - concurrent Kafka subscriber (with autocommit mode)
from faststream.kafka import KafkaBroker
broker = KafkaBroker()
@broker.subscriber("topic", max_workers=10)
async def handler():
"""Using `max_workers` option you can process up to 10 messages by one subscriber concurrently"""
Also, thanks to @Sehat1137 with his ASGI CLI start fixins - now you can use FastStream CLI to scale your AsgiFastStream application by workers
faststream run main:asgi --workers 2
There are a lot of other incredible changes you made:
- feat: add NatsMessage ack_sync method #1906 by @wpn10 in #1909
- feat: support running ASGI app with Uvicorn using file descriptor by @minhyeoky in #1923
- feat: Add kafka concurrent subscriber by @Flosckow in #1912
- fix: bug when using one register for several middleware by @roma-frolov in #1921
- fix: change oauth type in asyncapi schema by @spataphore1337 in #1926
- fix: HandlerException ignored by @roma-frolov in #1928
- fix: Pomo/nats router by @Drakorgaur in #1932
- fix: RabbitBroker's ping is more objective by @roma-frolov in #1933
- fix: AsyncAPI 2.6.0 fix empty channels for KafkaSubscriber and ConfluentSubscriber if partitions provided by @KrySeyt in #1930
- fix: #1874 support workers for ASGI FastStream by @Sehat1137 in #1936
- fix: correct middlewares order by @sheldygg in #1935
- chore: run PR altering automated check in same CI job by @kumaranvpl in #1942
- chore: pin typer version by @Lancetnik in #1947
New Contributors
- @wpn10 made their first contribution in #1909
- @minhyeoky made their first contribution in #1923
Full Changelog: 0.5.30...0.5.31
v0.5.30
What's Changed
- Introducing FastStream Guru on Gurubase.io by @kursataktas in #1903
- docs: add gurubase badge to the doc by @Lancetnik in #1905
- fix: allow users to pass
nkeys_seed_str
as argument for NATS broker. by @Drakorgaur in #1908 - Add more warning's to nats subscription factory by @sheldygg in #1907
- fix: correct working with dependencies versions by @Lancetnik in #1918
New Contributors
- @kursataktas made their first contribution in #1903
- @Drakorgaur made their first contribution in #1908
Full Changelog: 0.5.29...0.5.30
v0.5.29
What's Changed
- feat: add explicit message source enum by @Lancetnik in #1866
- Change uv manual installation to setup-uv in CI by @pavelepanov in #1871
- refactor: make Task and Concurrent mixins broker-agnostic by @Lancetnik in #1873
- Add support for environment variables in faststream run command by @ulbwa in #1876
- fastapi example update by @xodiumx in #1875
- Do not import
fake_context
if not needed by @sobolevn in #1877 - build: add warning about manual lifespan_context by @vectorvp in #1878
- Add trending badge by @davorrunje in #1882
- feat: add class method to create a baggage instance from headers by @vectorvp in #1885
- ops: update docker compose commands to compose V2 in scripts by @vectorvp in #1889
New Contributors
- @pavelepanov made their first contribution in #1871
- @xodiumx made their first contribution in #1875
- @sobolevn made their first contribution in #1877
- @vectorvp made their first contribution in #1878
Full Changelog: 0.5.28...0.5.29
v0.5.28
What's Changed
There were a lot of time since 0.5.7 OpenTelemetry release and now we completed Observability features we planned! FastStream supports Prometheus metrics in a native way!
Special thanks to @roma-frolov and @draincoder (again) for it!
To collect Prometheus metrics for your FastStream application you just need to install special distribution
pip install faststream[prometheus]
And use PrometheusMiddleware. Also, it could be helpful to use our ASGI to serve metrics endpoint in the same app.
from prometheus_client import CollectorRegistry, make_asgi_app
from faststream.asgi import AsgiFastStream
from faststream.nats import NatsBroker
from faststream.nats.prometheus import NatsPrometheusMiddleware
registry = CollectorRegistry()
broker = NatsBroker(
middlewares=(
NatsPrometheusMiddleware(registry=registry),
)
)
app = AsgiFastStream(
broker,
asgi_routes=[
("/metrics", make_asgi_app(registry)),
]
)
Moreover, we have a ready-to-use Grafana dashboard you can just import and use!
To find more information about Prometheus support, just visit our documentation.
All changes
- docs: Correct minimum FastAPI version for lifespan handling by @tim-hutchinson in #1853
- add aiogram example by @IvanKirpichnikov in #1858
- Feature: Prometheus Middleware by @roma-frolov in #1791
- Add in-progress tutorial to how-to section by @sheldygg in #1859
- docs: Add info about Grafana dashboard by @draincoder in #1863
New Contributors
- @tim-hutchinson made their first contribution in #1853
Full Changelog: 0.5.27...0.5.28