Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
352 commits
Select commit Hold shift + click to select a range
74245e2
Documentation generation from AsyncAPI 3.0.0 support. Documentation s…
KrySeyt Aug 17, 2024
91f2bd9
Add asyncapi in docs CLI commands
KrySeyt Aug 17, 2024
15486d4
Tests update
KrySeyt Aug 17, 2024
b06f1e3
Tests update
KrySeyt Aug 17, 2024
8738774
Tests update
KrySeyt Aug 17, 2024
a01a6c2
CLI breaking changes revert
KrySeyt Aug 18, 2024
6c68603
AsyncAPI generation version choosing API changed
KrySeyt Aug 18, 2024
b4f7357
Add kerberos support for confluent broker (#1670)
kumaranvpl Aug 12, 2024
4439479
fix: support all RMQ exchanges in AsyncAPI (#1679)
Lancetnik Aug 13, 2024
6748d3f
Remove unused ignores (#1690)
kumaranvpl Aug 16, 2024
65fcfe2
Update package versions (#1702)
kumaranvpl Aug 20, 2024
94cdefb
feat: add broker.request method (#1649)
Lancetnik Aug 24, 2024
7489bde
Schema v3 and info v3
KrySeyt Jul 22, 2024
a06426d
AsyncAPI rabbit naming test
KrySeyt Jul 28, 2024
f7561cf
AsyncAPI schemas refactoring
KrySeyt Aug 4, 2024
5b46c8e
AsyncAPI generation refactoring
KrySeyt Aug 8, 2024
8937c9f
AsyncAPI 2.6.0 generation from internal specs
KrySeyt Aug 10, 2024
3c79d1a
mypy satisfied
KrySeyt Aug 11, 2024
230c910
refactoring
KrySeyt Aug 13, 2024
caff67f
fix
KrySeyt Sep 7, 2024
fbb0864
Tests update
KrySeyt Aug 17, 2024
93ec7ec
Confluent gssapi security schema test fix
KrySeyt Sep 6, 2024
ec4534c
fix
KrySeyt Sep 7, 2024
c0578b3
fix
KrySeyt Sep 7, 2024
08cce1c
fixes
KrySeyt Sep 7, 2024
b0314e1
fixes
KrySeyt Sep 8, 2024
c92d0f3
Ruff fixes
KrySeyt Sep 8, 2024
21a0d62
Fix kafka oauth test
KrySeyt Sep 8, 2024
94adc4e
Revert start_test_env.sh script docker compose update
KrySeyt Sep 8, 2024
5dd2f7c
docs: generate API References
KrySeyt Sep 8, 2024
531e268
Fix specification bindings amqp channel Exchange
KrySeyt Sep 8, 2024
697328a
Remove unused type: ignore comments
KrySeyt Sep 8, 2024
4e9cab7
type: ignore[override]
KrySeyt Sep 8, 2024
917f7cf
mypy satisfied
KrySeyt Sep 8, 2024
6111e53
mypy satisfied
KrySeyt Sep 8, 2024
da646d5
fixes
KrySeyt Sep 8, 2024
d8a21d9
rm debug statement
KrySeyt Sep 8, 2024
c48b3e1
fixes
KrySeyt Sep 8, 2024
9bb421f
remove unused code
KrySeyt Sep 8, 2024
ec2a962
Fix AsyncAPI 3.0.0 specs error
KrySeyt Sep 8, 2024
feaf2cc
Refactoring AsyncAPI specs generation
KrySeyt Sep 8, 2024
3eaf137
Fix AsyncAPI 3.0 tests
KrySeyt Sep 9, 2024
ffa76cb
Add oauth and gssapi AsyncAPI 3.0.0 tests for Kafka and Confluent
KrySeyt Sep 9, 2024
4cb0707
refactoring
KrySeyt Sep 9, 2024
2e1212e
refactoring
KrySeyt Sep 9, 2024
ceb80c6
refactoring
KrySeyt Sep 9, 2024
aae844b
fix
KrySeyt Sep 9, 2024
346a67a
Merge pull request #1624 from KrySeyt/add_asyncapi_v3_0_support
Lancetnik Sep 10, 2024
171064b
docs: generate API References
Lancetnik Sep 10, 2024
4842baa
chore: merge main
Lancetnik Sep 11, 2024
91405d9
Merge branch 'main' into 0.6.0
KrySeyt Sep 12, 2024
432b498
Merge pull request #1787 from KrySeyt/0.6.0
Lancetnik Sep 13, 2024
dc8deef
refactor: change project structura
Lancetnik Sep 13, 2024
6b638c7
lint: add ruff TID check
Lancetnik Sep 13, 2024
485c113
tests: use request instead of rpc publish everywhere
Lancetnik Sep 13, 2024
35fa776
refactor: remove NATS publish rpc
Lancetnik Sep 13, 2024
fba8e91
tests: polish requests tests
Lancetnik Sep 13, 2024
1662627
refactor: remove RMQ publish rpc
Lancetnik Sep 13, 2024
f551c21
refactor: remove Redis publish rpc
Lancetnik Sep 13, 2024
9996650
refactor: remove Kafka & Confluent publish rpc
Lancetnik Sep 13, 2024
0d90eba
Refactor AsyncAPI 2.6.0 generation / handling + fix wrong message title
KrySeyt Sep 13, 2024
1999eb8
AsyncAPI 3.0.0 generation / char in titles support
KrySeyt Sep 14, 2024
92f7f74
AsyncAPI generation / handling tests
KrySeyt Sep 14, 2024
c6e5bad
New tests refactoring
KrySeyt Sep 14, 2024
d7c6a75
docs: generate API References
KrySeyt Sep 14, 2024
07fb943
fix: correct AsyncAPI 2.6.0 channel names
Lancetnik Sep 16, 2024
7ea8db6
Merge pull request #1790 from KrySeyt/asyncapi_3.0.0_/_support
Lancetnik Sep 16, 2024
2a978c9
chore: merge main
Lancetnik Sep 16, 2024
5d4cac1
refactor: remove global broker from context
Lancetnik Sep 16, 2024
cc55a61
tests: fix all tests
Lancetnik Sep 17, 2024
0a6b83b
tests: refactor tests
Lancetnik Sep 18, 2024
865185e
logging fsm
Lancetnik Sep 20, 2024
2ac9c80
Feat: add process msg to broker.request methods (#1800)
Flosckow Sep 20, 2024
3a8665f
refactor: remove hash logic
Lancetnik Sep 23, 2024
cbae8bc
Merge branch 'main' into 0.6.0
Lancetnik Sep 23, 2024
51ee885
chore: merge main
Lancetnik Sep 24, 2024
996d8b1
Merge branch 'main' into 0.6.0
Lancetnik Sep 24, 2024
27a910d
refactor: reuse HAS_TYPER in CLI
Lancetnik Sep 25, 2024
d595de9
Merge branch '0.6.0' of github.com:airtai/faststream into 0.6.0
Lancetnik Sep 25, 2024
e2c89cd
Update specs public API (#1799)
KrySeyt Oct 1, 2024
199b3f4
refactor: change AsyncAPI inheritance tree
Lancetnik Oct 1, 2024
2ed00d7
lint: update ruff config, drop python3.8
Lancetnik Oct 2, 2024
6a38f00
chore: merge main
Lancetnik Oct 2, 2024
8c27d35
chore: merge main
Lancetnik Oct 10, 2024
50af9e3
add: NATS HowTO
Lancetnik Oct 10, 2024
e1c4d72
chore: merge main
Lancetnik Oct 17, 2024
aa6dc13
rm useless change
Lancetnik Oct 17, 2024
f63df92
refactor: create publisher factory
Lancetnik Oct 18, 2024
9a6461d
refactor: split publish to private
Lancetnik Oct 18, 2024
67ae2bf
chore: merge main
Lancetnik Oct 23, 2024
be596f0
refactor: use CMD to call publisher (#1857)
Lancetnik Oct 26, 2024
caa4cda
chore: merge main
Lancetnik Oct 28, 2024
5bbf7c8
chore: merge main
Lancetnik Oct 28, 2024
e39d0ad
Feat/fast depends 3 (#1886)
Lancetnik Oct 31, 2024
40d007b
Fixed RPC for Prometheus metrics (#1887)
roma-frolov Nov 1, 2024
0fa5fc1
tests on MetricsSettingsProvider for all brokers (#1890)
roma-frolov Nov 5, 2024
b5a123d
Merge branch 'main' into 0.6.0
Lancetnik Nov 5, 2024
0578c1b
feat/ack_middleware added middleware (#1869)
Rusich90 Nov 5, 2024
f54e5ee
refactor: use caps names for public enums
Lancetnik Nov 5, 2024
2a4c51d
refactor: little type changes
Lancetnik Nov 5, 2024
65ba4a4
refactor: new setup logic
Lancetnik Nov 6, 2024
cd87d8c
fix: correct RMQ subscriber get_one logic
Lancetnik Nov 6, 2024
af70c5b
Merge branch 'main' into 0.6.0
Lancetnik Nov 6, 2024
aa1562d
chore: fix pydantic 2.10 compatibility
Lancetnik Nov 7, 2024
4c14134
chore: merge main
Lancetnik Nov 7, 2024
362f6c9
refactor: create default middlewares in runtime
Lancetnik Nov 8, 2024
5211e43
Merge branch 'main' into 0.6.0
Lancetnik Nov 11, 2024
69f1985
refactor: add ack handling for brokers (#1897)
vectorvp Nov 12, 2024
736baba
feat: lazy decoder
Lancetnik Nov 13, 2024
9cf95c7
feat: added ack_first
Rusich90 Nov 14, 2024
d64f9f5
docs: generate API References
Rusich90 Nov 14, 2024
ad8d6b4
feat: ack_first added deprecated and docstrings to Ack_Policy
Rusich90 Nov 19, 2024
36da6ac
docs: generate API References
Rusich90 Nov 19, 2024
9b04fe8
chore: merge main
Lancetnik Nov 19, 2024
6c2d155
docs: fix typo
Lancetnik Nov 19, 2024
157151b
feat: ack_first refactored ack_first check
Rusich90 Nov 20, 2024
f22c2d5
refactor: new Specification Schema (#1843)
Lancetnik Nov 20, 2024
921ead8
fix: correct AsyncAPI 2.6 operations
Lancetnik Nov 20, 2024
181e862
tests: add Nats concurrent test
Lancetnik Nov 20, 2024
51f16eb
tests: actualize AsyncAPI 2.6.0 tests
Lancetnik Nov 20, 2024
7bd03af
fix: do not ack Nats Core message:
Lancetnik Nov 21, 2024
f269339
chore: merge main
Lancetnik Nov 22, 2024
cdeb2e8
chore: fix NATS Core acknowledgement
Lancetnik Nov 22, 2024
d1820fe
Remove `retry` from docs and add acknowledgement to getting start (#1…
sheldygg Nov 25, 2024
d81397a
tests: add middlewares enter-exit order test
Lancetnik Nov 25, 2024
08bb54d
Merge branch '0.6.0' of github.com:airtai/faststream into 0.6.0
Lancetnik Nov 25, 2024
898dd53
chore: merge 0.6
Lancetnik Nov 26, 2024
de1bca8
Merge branch 'Rusich90-feat/ack_first' into 0.6.0
Lancetnik Nov 26, 2024
d13624c
feat: added ack_first (#1917)
Rusich90 Nov 26, 2024
308dc50
Merge branch 'main' into 0.6.0
Lancetnik Nov 26, 2024
9456e7a
Fix AsyncAPI 3.0.0 AMQP bindings (#1949)
KrySeyt Dec 1, 2024
f8ab59d
docs: use DeliverPolicy Enum for deliver_policy in subscriber (#1952)
Majajashka Dec 1, 2024
65312e9
chore: merge main
Lancetnik Dec 3, 2024
1fd1039
chore: remove useless
Lancetnik Dec 3, 2024
af6f92f
lint: fix mypy a bit
Lancetnik Dec 4, 2024
7eb491c
chore: merge main
Lancetnik Dec 4, 2024
f010bd3
chore: remove useless code
Lancetnik Dec 4, 2024
4100bc0
chore: merge main
Lancetnik Dec 5, 2024
9e57990
tests: make cli tests little bit clear
Lancetnik Dec 5, 2024
31d913f
refactor: make BaseMiddleware generic
Lancetnik Dec 7, 2024
d490f41
Merge branch 'main' into 0.6.0
Lancetnik Dec 7, 2024
0bf4fc7
refactor: make Prometheus middleware generic
Lancetnik Dec 7, 2024
3af457d
Merge branch '0.6.0' of github.com:airtai/faststream into 0.6.0
Lancetnik Dec 7, 2024
9730784
refactor: make Telemetry middleware generic
Lancetnik Dec 7, 2024
00cce6a
refactor: deprecate subscriber/publisher-level middlewares
Lancetnik Dec 7, 2024
7b00966
refactor: deprecate filter middlewares
Lancetnik Dec 7, 2024
82e3969
tests: fix Kafka tests from main branch
Lancetnik Dec 9, 2024
baf6178
feat: init_routes added routes to init broker (#1981)
Rusich90 Dec 10, 2024
5f4c9f4
Fix: return logger (#1982)
Flosckow Dec 10, 2024
b9c7dd4
Feat: replace subscribers (#1976)
Flosckow Dec 10, 2024
a456e94
lint: fix routers types
Lancetnik Dec 11, 2024
a10d9b5
lint: fix internal broker types
Lancetnik Dec 11, 2024
4bf0e33
lint: fix ruff TC006
Lancetnik Dec 11, 2024
7025d86
lint: fix internal mypy
Lancetnik Dec 11, 2024
b84c032
feat: add application states (#1974)
Artem-Safronov Dec 12, 2024
cddf8de
fix: correct FastAPI with new state
Lancetnik Dec 12, 2024
c032ecf
tests: refactor publish js frame test
Lancetnik Dec 13, 2024
acf1d8c
feat: make return RecordMetada if not no_confirm, change annotations …
spataphore1337 Dec 14, 2024
d1a2376
fix type hins in faststream/specification (#1985)
IvanKirpichnikov Dec 15, 2024
d958655
chore: polish types
Lancetnik Dec 15, 2024
2bb82c2
lint: fix top-level mypy
Lancetnik Dec 15, 2024
c7f4bc3
lint: fix rabbit otel & prometheus mypy
Lancetnik Dec 15, 2024
195035e
lint: fix rabbit response types
Lancetnik Dec 15, 2024
a728ba7
feat: add raise BatchBufferOverflowException (#1989)
spataphore1337 Dec 16, 2024
5f9c7b6
fix: KeyError 'reply_to' in rabbit (#1999)
ApostolFet Dec 19, 2024
0b49d76
feat: delayed broker setting (#1931)
roma-frolov Dec 20, 2024
bc87327
lint: fix rabbit types a bit
Lancetnik Dec 20, 2024
f2bfb7c
Merge branch '0.6.0' of github.com:airtai/faststream into 0.6.0
Lancetnik Dec 20, 2024
bbea365
feat: Pretty prom tests (#2000)
roma-frolov Dec 23, 2024
ae50f1e
fix: correct PublishType for publisher decorator
Lancetnik Dec 25, 2024
094b7f4
Merge branch '0.6.0' of github.com:airtai/faststream into 0.6.0
Lancetnik Dec 25, 2024
8737347
Overwrite message schema (#2007)
ApostolFet Dec 25, 2024
a827df0
chore: merge main
Lancetnik Dec 26, 2024
2af8277
Merge branch '0.6.0' of github.com:airtai/faststream into 0.6.0
Lancetnik Dec 26, 2024
0694ef4
new test: in_memory_routing (#2010)
Dec 28, 2024
d482f7c
Merge branch 'main' into 0.6.0
Lancetnik Dec 28, 2024
18c166f
Separated thread for confluent kafka consumer client. (#2014)
DABND19 Dec 30, 2024
4f98e59
Feat: concurrent redis (#2012)
Flosckow Dec 30, 2024
e4d6e65
Merge branch 'main' into 0.6.0
Lancetnik Dec 30, 2024
5bced11
chore: add warning comment to confluent client
Lancetnik Dec 30, 2024
d16fecf
fix: show a warning only if the message scheme is changed (#2021)
ApostolFet Jan 6, 2025
258683e
add warning for overwrite channel (#2020)
ApostolFet Jan 6, 2025
d5fb85e
Confluent kafka producer refactoring. (#2019)
DABND19 Jan 7, 2025
95195fa
lint: correct Redis producer publish types
Lancetnik Jan 8, 2025
d03b62d
lint: fix specification mypy
Lancetnik Jan 9, 2025
97ff3cb
Type-hints + refactoring (#2018)
Jan 9, 2025
a988154
feat: add PublishCmd.batch_bodies setter
Lancetnik Jan 9, 2025
6d91da9
refactor: basic BatchPublishCommand
Lancetnik Jan 10, 2025
e26749a
chore: update deprecations
Lancetnik Jan 10, 2025
21976c2
tests: use correct import name
Lancetnik Jan 11, 2025
57c0633
Fix: middleware type hints (#2033)
DABND19 Jan 14, 2025
2e9929e
chore: merge main (#2045)
Lancetnik Jan 19, 2025
0cfa8db
refactor: use RMQ declare instead of passive option
Lancetnik Feb 26, 2025
25d5261
refactor: deprecate log_fmt option
Lancetnik Feb 26, 2025
e05e8d4
pull main
Lancetnik Mar 2, 2025
6383f02
feature: support RMQ autoacknowledgement
Lancetnik Mar 31, 2025
61ac5cb
tests: resolve RMQ conflicts
Lancetnik Mar 31, 2025
d91fcc8
fix: resolve kafka conflicts
Lancetnik Apr 1, 2025
168ec63
fix: resolve conflicts
Lancetnik Apr 1, 2025
e49399a
fix: resolve conflicts
Lancetnik Apr 2, 2025
b1e40a2
fix: correct logging setLevel
Lancetnik Apr 3, 2025
c0503b7
tests: add missing fixture
Lancetnik Apr 6, 2025
187cfcb
chore: merge main
Lancetnik Apr 7, 2025
7bb55b1
chore: merge main
Lancetnik Apr 12, 2025
976fa2e
chore: merge main
Lancetnik Apr 16, 2025
5ab9641
tests: make FastAPI validation in-memory
Lancetnik Apr 20, 2025
2e4e354
fix: correct Kafka rebalance logging tests
Lancetnik Apr 20, 2025
5b88c0e
Subscriber iterator (#2039)
ApostolFet Apr 20, 2025
65415d1
chore: pull main
Lancetnik May 4, 2025
1cd6934
chore: resolve conflicts
Lancetnik May 12, 2025
13a63be
chore: update from main
Lancetnik May 19, 2025
2df3ec0
tests: fix typer
Lancetnik May 19, 2025
ba12f61
chore: merge main
Lancetnik May 20, 2025
70d47af
Merge branch 'main' into 0.6.0
Lancetnik May 20, 2025
f62f70a
chore: merge main
Lancetnik May 20, 2025
07ab9bc
Feat: add dto in subscribers and publishers constructor (#2038)
Flosckow May 20, 2025
9f88f43
Merge branch '0.6.0' of github.com:airtai/faststream into 0.6.0
Lancetnik May 20, 2025
9fc8f91
chore: merge DTO
Lancetnik May 20, 2025
ecdb6a9
chore: fix timestamp
Lancetnik May 21, 2025
3ce2dff
refactor: polish DTO for publishers & subscribers factories
Lancetnik May 21, 2025
a668aff
fix: correct and test AckPolicy logic
Lancetnik May 21, 2025
f9facd8
chore: merge main
Lancetnik May 21, 2025
848bf9b
Feature: add test for pubkishers with same name (#2237)
Flosckow May 27, 2025
6c6d755
refactor: new object registration logic (#2235)
Lancetnik Jun 2, 2025
dc00f1c
chore: add subscriber error logging
Lancetnik Jun 3, 2025
b843368
chore: merge main
Lancetnik Jun 3, 2025
9e0e3a7
lint: polish mypy a bit
Lancetnik Jun 4, 2025
9130e72
chore: revert changes
Lancetnik Jun 4, 2025
7e0204f
docs: new way asyncapi (#2273)
Flosckow Jun 9, 2025
31b299f
docs/update acknowledgment.md (#2296)
theseriff Jun 15, 2025
4a97fcf
refactor: RMQ specification composition instead of inheritance (#2279)
Lancetnik Jun 19, 2025
cf49bb0
chore: mv service files to .github
Lancetnik Jun 20, 2025
6e28c0e
Merge branch '0.6.0' of github.com:airtai/faststream into 0.6.0
Lancetnik Jun 20, 2025
dee4a4e
chore: mv service files to .github
Lancetnik Jun 20, 2025
4cbcc99
chore: mv meaning files back
Lancetnik Jun 20, 2025
490c5aa
chore: merge main
Lancetnik Jun 24, 2025
14b5de9
chore: merge main
Lancetnik Jun 24, 2025
3cc6f32
tests: speedup CLI tests
Lancetnik Jun 24, 2025
7fe168d
docs: add API References
Lancetnik Jun 24, 2025
42ff8d3
chore: format CI file
Lancetnik Jun 24, 2025
8ba005b
chore: correct cursor rule metainfo (#2316)
Lancetnik Jun 24, 2025
ed3a79a
tests: mock confluent flaky test
Lancetnik Jun 25, 2025
246ce38
chore: remove useless group
Lancetnik Jun 25, 2025
4511eac
chore: fix docs.py types
Lancetnik Jun 25, 2025
9a44ad8
feat: FS-2031 added docker compose and justfile (#2066)
Rusich90 Jun 25, 2025
01b8e44
Merge branch 'main' into 0.6.0
Lancetnik Jun 25, 2025
b186953
chore: remove some docstrings
Lancetnik Jun 25, 2025
3b1a96e
Merge branch '0.6.0' of github.com:airtai/faststream into 0.6.0
Lancetnik Jun 25, 2025
befcf51
Feat: add test to msgspec (#2290)
Flosckow Jun 25, 2025
902b812
Add worker_id extra option
borisalekseev Jun 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
105 changes: 105 additions & 0 deletions .cursor/rules/faststream.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
description: FastStream python framework usage rules
globs: *.py
alwaysApply: false
---

- Always pass broker to `FastStream` object as a positional argument
- You can't use `app.broker` / `FastStream.broker` / `AsgiFastStream.broker` attribute in your code
- `app.run` / `FastStream.run` / `AsgiFastStream.run` is an async function, so it should be called by `asyncio.run`
- To log something always use `faststream.Logger` passing as a Context- Don't use `print(...)` to log anything in your code. Use `faststream.Logger` instead
- Never do create broker inside application `FastStream(Broker())`
- Subscribers have to be created by broker / router only: `@broker.subscriber` / `@router.subscriber`
- Publishers have to be created by broker / router only: `@broker.publisher` / `@router.publisher`
- Always use type annotations in `@broker.subscriber` or `@router.subscriber` decorated functions. Result annotation should be `None` by default
- Never add to `@broker.subscriber` or `@router.subscriber` decorated functions useless in code options.

## JSON Serialization

To serialize incoming messages with complex JSON structure use `Pydantic` models in annotations

```python
from pydantic import BaseModel

class IncomingMessage(BaseModel):
field: str
another_field: str

@broker.subscriber("in")
async def handler(body: IncomingMessage) -> None:
...
```

## Path feature

To consume information from incoming subject, use `faststream.Path`

```python
from typing import Annotated
from faststream import Path

@broker.subscriber("logs.{log_level}")
async def handle_logs(log_level: Annotated[str, Path()]) -> None:
...
```

You have to import `faststream.Path` to use this feature

## Context

FastStreams has its own Dependency Injection container - Context, used to store application runtime objects and variables.

```python
from typing import Annotated
from faststream import Context, FastStream
from faststream.kafka import KafkaBroker, KafkaMessage

broker = KafkaBroker()
app = FastStream(broker)

@broker.subscriber("test")
async def base_handler(body: str, message: Annotated[KafkaMessage, Context()]) -> None:
...
```

Context already contains some global objects that you can always access:

* broker - the current broker
* context - the context itself, in which you can write your own fields
* logger - the logger used for your broker (tags messages with message_id)
* message - the raw message (if you need access to it)

To use them, simply import and use them as subscriber argument annotations.

Shared aliases

```python
from faststream import Logger, ContextRepo, NoCast
```

And per-broker

```python
from faststream.[broker] import [Broker]Message
```

```python
from faststream import FastStream, Context, Logger, ContextRepo
from faststream.kafka import KafkaBroker, KafkaMessage
from faststream.kafka.annotations import KafkaBroker as BrokerAnnotation

broker_object = KafkaBroker("localhost:9092")
app = FastStream(broker_object)

@broker_object.subscriber("response-topic")
async def handle_response(
logger: Logger,
message: KafkaMessage,
context: ContextRepo,
broker: BrokerAnnotation,
) -> None:
logger.info(message)
await broker.publish("test", "response")
```

Don't add useless Context options to function signature. Use only required ones.Don't import useless annotations as well.
1 change: 0 additions & 1 deletion .devcontainer/devcontainer.env

This file was deleted.

51 changes: 0 additions & 51 deletions .devcontainer/devcontainer.json

This file was deleted.

88 changes: 0 additions & 88 deletions .devcontainer/docker-compose.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions .devcontainer/setup.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/workflows/docs_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
path: .cache
- run: |
set -ux
uv pip install --system -e .[dev]
uv pip install --system --group dev -e .
uv pip uninstall --system email-validator # This is to fix broken link in docs
- run: ./scripts/build-docs.sh
- run: cd docs && python docs.py build
- run: echo "VERSION=$(python3 -c 'from importlib.metadata import version; print(".".join(version("faststream").split(".")[:2]))')" >> $GITHUB_ENV
- run: echo "IS_RC=$(python3 -c 'from importlib.metadata import version; print("rc" in version("faststream"))')" >> $GITHUB_ENV
- name: Configure Git user
Expand Down
Loading
Loading