Module kflow_group_kafka_messages

This module collects kafka messages into a list.

Copyright © 2018-2019 Klarna Bank AB (publ)

Behaviours: kflow_gen_aggregate.

Description

This module collects kafka messages into a list.

Input message format:
   #{ key => K
    , value => V
    , headers => Headers
    , partition => Partition
    }
Output message format:
   #{ values => [ #{ key => K1
                   , value => V1
                   , headers => H1
                   }
                , #{ key => K2
                   , value => V2
                   , headers => H2
                   }
                , ...
                ]
    , partition => Partition
    }

Partition of the first seen message is used for the entire chunk.

Example usage

   {aggregate, kflow_group_kafka_messages, #{ max_messages => 42
                                            , max_size => 10000
                                            }}

Data Types

config()

config() = #{max_messages => non_neg_integer(), max_size => non_neg_integer() | undefined}


Generated by EDoc