Skip to content

BatchConfig

Source code in docs_src/capo_iot/types/batch_config.py
class BatchConfig(TypedDict, closed=True):
    max_batch_open_ms: NotRequired["capo_iot.types.max_batch_open_ms.MaxBatchOpenMs"]
    """<p>The maximum amount of time (in milliseconds) that an outgoing call waits for other calls with which it batches messages of the same type. The higher the setting, the longer the latency of the batched HTTP Action will be.</p>"""
    max_batch_size: NotRequired["capo_iot.types.max_batch_size.MaxBatchSize"]
    """<p>The maximum number of messages that are batched together in a single action execution.</p>"""
    max_batch_size_bytes: NotRequired[
        "capo_iot.types.max_batch_size_bytes.MaxBatchSizeBytes"
    ]
    """<p>Maximum size of a message batch, in bytes.</p>"""
    batch_across_topics: "capo_iot.types.batch_across_topics.BatchAcrossTopics"
    """<p>Whether to allow batching messages from different MQTT topics into a single HTTP request. By default, only messages from the same topic are batched together. The default value is <code>false</code>.</p> <note> <p>When <code>batchAcrossTopics</code> is enabled, the error payload format changes: the <code>topic</code> field moves from the top level to inside each entry in the <code>payloadsWithMetadata</code> array, since each message in the batch may originate from a different topic.</p> </note> <note> <p>Messages are always batched within the scope of the same account, rule name, target HTTP endpoint URL, and billing group. Messages that differ in any of these attributes are never combined into the same batch, regardless of the <code>batchAcrossTopics</code> setting.</p> </note>"""

batch_across_topics instance-attribute

batch_across_topics: BatchAcrossTopics

Whether to allow batching messages from different MQTT topics into a single HTTP request. By default, only messages from the same topic are batched together. The default value is false.

When batchAcrossTopics is enabled, the error payload format changes: the topic field moves from the top level to inside each entry in the payloadsWithMetadata array, since each message in the batch may originate from a different topic.

Messages are always batched within the scope of the same account, rule name, target HTTP endpoint URL, and billing group. Messages that differ in any of these attributes are never combined into the same batch, regardless of the batchAcrossTopics setting.

max_batch_open_ms instance-attribute

max_batch_open_ms: NotRequired[MaxBatchOpenMs]

The maximum amount of time (in milliseconds) that an outgoing call waits for other calls with which it batches messages of the same type. The higher the setting, the longer the latency of the batched HTTP Action will be.

max_batch_size instance-attribute

max_batch_size: NotRequired[MaxBatchSize]

The maximum number of messages that are batched together in a single action execution.

max_batch_size_bytes instance-attribute

max_batch_size_bytes: NotRequired[MaxBatchSizeBytes]

Maximum size of a message batch, in bytes.