Bases: BaseModel
Data.Rentgen producer-specific settings.
These options are passed directly to
AIOKafkaProducer <https://aiokafka.readthedocs.io/en/stable/api.html#aiokafka.AIOKafkaProducer>_.
Examples
.. code-block:: bash
DATA_RENTGEN__PRODUCER__MAIN_TOPIC="input.runs"
DATA_RENTGEN__PRODUCER__MALFOMED_TOPIC="input.runs__malformed"
Source code in data_rentgen/consumer/settings/producer.py
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 | class ProducerSettings(BaseModel):
"""Data.Rentgen producer-specific settings.
These options are passed directly to
`AIOKafkaProducer <https://aiokafka.readthedocs.io/en/stable/api.html#aiokafka.AIOKafkaProducer>`_.
Examples
--------
.. code-block:: bash
DATA_RENTGEN__PRODUCER__MAIN_TOPIC="input.runs"
DATA_RENTGEN__PRODUCER__MALFOMED_TOPIC="input.runs__malformed"
"""
main_topic: str = Field(
default="input.runs",
description="Topic to publish messages to.",
)
malformed_topic: str = Field(
default="input.runs__malformed",
description="Topic to publish malformed messages to.",
)
acks: NonNegativeInt | Literal["all"] = Field(
default="all",
description="Number of required acknowledgments.",
)
max_batch_size: int = Field(
default=16 * 1024,
description="Maximum size of buffered data per partition.",
)
max_request_size: int = Field(
default=5 * 1024 * 1024,
description="Maximum request size in bytes.",
)
|