KafkaPublisher
faststream.confluent.broker.router.KafkaPublisher
#
KafkaPublisher(
topic,
*,
key=None,
partition=None,
headers=None,
reply_to="",
batch=False,
middlewares=(),
title=None,
description=None,
schema=None,
include_in_schema=True,
)
Bases: ArgsContainer
Delayed KafkaPublisher registration object.
Just a copy of KafkaRegistrator.publisher(...)
arguments.
Initialize KafkaPublisher.
PARAMETER | DESCRIPTION |
---|---|
topic
|
Topic where the message will be published.
TYPE:
|
key
|
A key to associate with the message. Can be used to
determine which partition to send the message to. If partition
is
TYPE:
|
partition
|
Specify a partition. If not set, the partition will be
selected using the configured
TYPE:
|
headers
|
Message headers to store metainformation.
content-type and correlation_id will be set automatically by framework anyway.
Can be overridden by
TYPE:
|
reply_to
|
Topic name to send response.
TYPE:
|
batch
|
Whether to send messages in batches or not.
TYPE:
|
middlewares
|
Publisher middlewares to wrap outgoing messages.
TYPE:
|
title
|
AsyncAPI publisher object title.
TYPE:
|
description
|
AsyncAPI publisher object description.
TYPE:
|
schema
|
AsyncAPI publishing message type.
Should be any python-native object annotation or
TYPE:
|
include_in_schema
|
Whetever to include operation in AsyncAPI schema or not.
TYPE:
|