NatsResponse
faststream.nats.NatsResponse #
NatsResponse(
body: SendableMessage,
*,
headers: dict[str, str] | None = None,
correlation_id: str | None = None,
stream: str | None = None,
schedule: Optional[Schedule] = None,
)
Bases: Response
Source code in faststream/nats/response.py
get_publish_key #
Get the key for publishing this message.
Override this method in subclasses to provide broker-specific keys. Default implementation returns None (no key).
| RETURNS | DESCRIPTION |
|---|---|
Any | None | The key for publishing, or None if this Response type doesn't use keys. |
Source code in faststream/response/response.py
as_publish_command #
as_publish_command() -> NatsPublishCommand