NatsRouter
faststream.nats.shared.router.NatsRouter #
Bases: BrokerRouter[str, Msg]
Source code in faststream/nats/shared/router.py
include_router #
Includes a router in the current object.
PARAMETER | DESCRIPTION |
---|---|
router | The router to be included. TYPE: |
RETURNS | DESCRIPTION |
---|---|
None | None |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
Source code in faststream/broker/router.py
include_routers #
Includes routers in the object.
PARAMETER | DESCRIPTION |
---|---|
*routers | Variable length argument list of routers to include. TYPE: |
RETURNS | DESCRIPTION |
---|---|
None | None |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
Source code in faststream/broker/router.py
publisher abstractmethod
#
Publishes a message.
PARAMETER | DESCRIPTION |
---|---|
subj | Subject of the message TYPE: |
*args | Additional arguments TYPE: |
**kwargs | Additional keyword arguments TYPE: |
RETURNS | DESCRIPTION |
---|---|
BasePublisher[MsgType] | The published message |
RAISES | DESCRIPTION |
---|---|
NotImplementedError | If the method is not implemented |
Note
The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
Source code in faststream/broker/router.py
subscriber #
subscriber(
subject: str, **broker_kwargs: Any
) -> Callable[
[Callable[P_HandlerParams, T_HandlerReturn]],
HandlerCallWrapper[
Msg, P_HandlerParams, T_HandlerReturn
],
]