KafkaPublishCommand
faststream.kafka.KafkaPublishCommand #
KafkaPublishCommand(
message: SendableMessage,
/,
*messages: SendableMessage,
topic: str,
_publish_type: PublishType,
key: bytes | Any | None = None,
partition: int | None = None,
timestamp_ms: int | None = None,
headers: dict[str, str] | None = None,
correlation_id: str | None = None,
reply_to: str = "",
no_confirm: bool = False,
timeout: float = 0.5,
)
Bases: BatchPublishCommand
Source code in faststream/kafka/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 #
from_cmd classmethod #
from_cmd(
cmd: Union[PublishCommand, KafkaPublishCommand],
*,
batch: bool = False,
) -> KafkaPublishCommand