AsyncAPIBatchPublisher
faststream.kafka.publisher.asyncapi.AsyncAPIBatchPublisher #
AsyncAPIBatchPublisher(*, topic, partition, headers, reply_to, broker_middlewares, middlewares, schema_, title_, description_, include_in_schema)
Bases: BatchPublisher
, AsyncAPIPublisher[Tuple['ConsumerRecord', ...]]
Source code in faststream/kafka/publisher/usecase.py
publish async
#
publish(message, *extra_messages, topic='', partition=None, timestamp_ms=None, headers=None, reply_to='', correlation_id=None, no_confirm=False, _extra_middlewares=())
Source code in faststream/kafka/publisher/usecase.py
402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 |
|
request async
#
request(message, topic='', *, key=None, partition=None, timestamp_ms=None, headers=None, correlation_id=None, timeout=0.5, _extra_middlewares=())
Source code in faststream/kafka/publisher/usecase.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
|
setup #
add_prefix #
schema #
Returns the schema of the API operation as a dictionary of channel names and channel objects.
add_middleware #
create staticmethod
#
create(*, batch: Literal[True], key: Optional[bytes], topic: str, partition: Optional[int], headers: Optional[Dict[str, str]], reply_to: str, broker_middlewares: Sequence[BrokerMiddleware[Tuple[ConsumerRecord, ...]]], middlewares: Sequence[PublisherMiddleware], schema_: Optional[Any], title_: Optional[str], description_: Optional[str], include_in_schema: bool) -> AsyncAPIBatchPublisher
create(*, batch: Literal[False], key: Optional[bytes], topic: str, partition: Optional[int], headers: Optional[Dict[str, str]], reply_to: str, broker_middlewares: Sequence[BrokerMiddleware[ConsumerRecord]], middlewares: Sequence[PublisherMiddleware], schema_: Optional[Any], title_: Optional[str], description_: Optional[str], include_in_schema: bool) -> AsyncAPIDefaultPublisher
create(*, batch: bool, key: Optional[bytes], topic: str, partition: Optional[int], headers: Optional[Dict[str, str]], reply_to: str, broker_middlewares: Sequence[BrokerMiddleware[Union[Tuple[ConsumerRecord, ...], ConsumerRecord]]], middlewares: Sequence[PublisherMiddleware], schema_: Optional[Any], title_: Optional[str], description_: Optional[str], include_in_schema: bool) -> Union[AsyncAPIBatchPublisher, AsyncAPIDefaultPublisher]
create(*, batch, key, topic, partition, headers, reply_to, broker_middlewares, middlewares, schema_, title_, description_, include_in_schema)
Source code in faststream/kafka/publisher/asyncapi.py
get_name #
get_description #
get_schema #
Source code in faststream/kafka/publisher/asyncapi.py
get_payloads #
Source code in faststream/broker/publisher/usecase.py
set_test #
Turn publisher to testing mode.