Parsing multiple log format in same file

I have a log file as in this link which is a composite log format that consists of key value pairs with '=' as the delimiter and csv type of rows with headers which are tab seperated. Still lost on how to parse these logs in logstash.

Note: The top part of key value pairs should act as metadata for each row.

This thread has an example of doing that. Note that it requires "--pipeline.workers 1", so it does not scale, and using class variables can be fragile, but it does the job.