Skip to content

Commit a6b5f56

Browse files
authored
fix incorrect nats nats annotations (#2619)
broker._stream doesn't exist anymore
1 parent ce2b3f8 commit a6b5f56

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

faststream/nats/annotations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@
2727
ObjectStorage = Annotated[_ObjectStore, Context(OBJECT_STORAGE_CONTEXT_KEY)]
2828
NatsMessage = Annotated[_Message, Context("message")]
2929
NatsBroker = Annotated[_Broker, Context("broker")]
30-
Client = Annotated[_NatsClient, Context("broker._connection")]
31-
JsClient = Annotated[_JetStream, Context("broker._stream")]
30+
Client = Annotated[_NatsClient, Context("broker.config.connection_state.connection")]
31+
JsClient = Annotated[_JetStream, Context("broker.config.connection_state.stream")]

faststream/nats/fastapi/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
NatsMessage = Annotated[NM, Context("message")]
1313
NatsBroker = Annotated[NB, Context("broker")]
14-
Client = Annotated[NatsClient, Context("broker._connection")]
15-
JsClient = Annotated[JetStreamContext, Context("broker._stream")]
14+
Client = Annotated[NatsClient, Context("broker.config.connection_state.connection")]
15+
JsClient = Annotated[JetStreamContext, Context("broker.config.connection_state.stream")]
1616

1717
__all__ = (
1818
"Client",

0 commit comments

Comments
 (0)