The design of a stream processor must account for the volume of data it will receive. The data should be processed in real-time and the processor should not fall behind. The following recipe demonstrates how grouping related data in a stream can help ensure sufficient throughput.
- Create the project from the following template:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch9/frp-grouping --path cncb-frp-grouping
- Navigate to the cncb-frp-grouping directory, cd cncb-frp-grouping.
- Review the file named serverless.yml.
- Review the file named handler.js with the following content:
module.exports.listener = (event, context,...