NatsPublishCommand
faststream.nats.NatsPublishCommand #
NatsPublishCommand(
message: SendableMessage,
*,
subject: str = "",
correlation_id: str | None = None,
headers: dict[str, str] | None = None,
reply_to: str = "",
stream: str | None = None,
timeout: float = 0.5,
_publish_type: PublishType,
)
Bases: PublishCommand
Source code in faststream/nats/response.py
as_publish_command #
as_publish_command() -> PublishCommand
Method to transform handlers' Response result to DTO for publishers.
Source code in faststream/response/response.py
add_headers #
headers_to_publish #
Source code in faststream/nats/response.py
from_cmd classmethod #
from_cmd(
cmd: Union[PublishCommand, NatsPublishCommand],
) -> NatsPublishCommand