npm.io
7.7.0 • Published 5d ago

@middy/event-batch-parser

Licence
MIT
Version
7.7.0
Deps
1
Size
21 kB
Vulns
0
Weekly
204

Middy `event-batch-parser` middleware

Middy logo

Event batch parser middleware for the middy framework: Kafka, Kinesis, Firehose, SQS, MQ with pluggable JSON / Avro / Protobuf parsers and AWS Glue Schema Registry support

GitHub Actions unit test status npm version Checked with Biome

You can read the documentation at: https://middy.js.org/docs/middlewares/event-batch-parser

Install

# Always required
npm install --save @middy/event-batch-parser

# Pick the format(s) you actually use
npm install --save avro-js        # for @middy/event-batch-parser/parseAvro
npm install --save protobufjs     # for @middy/event-batch-parser/parseProtobuf

# Optional: dynamic schema lookup from AWS Glue Schema Registry
npm install --save @middy/glue-schema-registry @aws-sdk/client-glue

Do not chain @middy/event-normalizer and @middy/event-batch-parser for binary-payload sources. The normalizer's UTF-8 round-trip corrupts Avro/Protobuf bytes before the parser sees them.

Documentation and examples

For documentation and examples, refer to the main Middy monorepo on GitHub or Middy official website.

Contributing

Everyone is very welcome to contribute to this repository. Feel free to raise issues or to submit Pull Requests.

License

Licensed under MIT License. Copyright (c) 2017-2026 will Farrell, Luciano Mammino, and Middy contributors.

Keywords