github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/processors/split.md (about)

     1  ---
     2  title: split
     3  type: processor
     4  status: stable
     5  categories: ["Utility"]
     6  ---
     7  
     8  <!--
     9       THIS FILE IS AUTOGENERATED!
    10  
    11       To make changes please edit the contents of:
    12       lib/processor/split.go
    13  -->
    14  
    15  import Tabs from '@theme/Tabs';
    16  import TabItem from '@theme/TabItem';
    17  
    18  
    19  Breaks message batches (synonymous with multiple part messages) into smaller batches. The size of the resulting batches are determined either by a discrete size or, if the field `byte_size` is non-zero, then by total size in bytes (which ever limit is reached first).
    20  
    21  ```yaml
    22  # Config fields, showing default values
    23  label: ""
    24  split:
    25    size: 1
    26    byte_size: 0
    27  ```
    28  
    29  This processor is for breaking batches down into smaller ones. In order to break a single message out into multiple messages use the [`unarchive` processor](/docs/components/processors/unarchive).
    30  
    31  If there is a remainder of messages after splitting a batch the remainder is also sent as a single batch. For example, if your target size was 10, and the processor received a batch of 95 message parts, the result would be 9 batches of 10 messages followed by a batch of 5 messages.
    32  
    33  The functionality of this processor depends on being applied across messages
    34  that are batched. You can find out more about batching [in this doc](/docs/configuration/batching).
    35  
    36  ## Fields
    37  
    38  ### `size`
    39  
    40  The target number of messages.
    41  
    42  
    43  Type: `int`  
    44  Default: `1`  
    45  
    46  ### `byte_size`
    47  
    48  An optional target of total message bytes.
    49  
    50  
    51  Type: `int`  
    52  Default: `0`  
    53  
    54