Bases: BaseModel
A class to represent a NATS pull subscription.
Initialize the NATS pull subscription.
PARAMETER | DESCRIPTION |
batch_size | TYPE: int DEFAULT: 1 |
timeout | TYPE: Optional[float] DEFAULT: 5.0 |
batch | TYPE: bool DEFAULT: False |
Source code in faststream/nats/pull_sub.py
| def __init__(
self,
batch_size: int = 1,
timeout: Optional[float] = 5.0,
batch: bool = False,
) -> None:
"""Initialize the NATS pull subscription.
Args:
batch_size: The batch size.
timeout: The timeout.
batch: Whether to batch.
"""
super().__init__(
batch_size=batch_size,
timeout=timeout,
batch=batch,
)
|
batch class-attribute
instance-attribute
batch: bool = Field(default=False)
batch_size class-attribute
instance-attribute
batch_size: int = Field(default=1)
timeout class-attribute
instance-attribute