PubsubIO has Write.withWriteFn and Read.withCoderAndParseFn functions that are used internally to read/write messages in Protobuf and Avros formats. These functions should be exposed also to the end user to simplify handling of custom formats.
Imported from Jira BEAM-3021. Original Jira may contain additional context.
Reported by: sivu.